From 0285d13bd642447cfbbc1338ed65ce5593b1fb73 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar Date: Wed, 23 Aug 2023 17:31:13 -0700 Subject: [PATCH 1/4] feat: add new protos --- proto/keystore_api/v1/keystore.proto | 57 ++++++++++++++++++---------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/proto/keystore_api/v1/keystore.proto b/proto/keystore_api/v1/keystore.proto index caad1144..5d7064c5 100644 --- a/proto/keystore_api/v1/keystore.proto +++ b/proto/keystore_api/v1/keystore.proto @@ -117,32 +117,12 @@ message CreateInviteRequest { uint64 created_ns = 3; } -// Request to create an invite payload from an existing topic, and store the -// topic keys in the Keystore -message CreateInviteFromTopicRequest { - xmtp.message_contents.SignedPublicKeyBundle recipient = 1; - string content_topic = 2; - uint64 created_ns = 3; -} - -// Request to create an invite payload, and store the topic keys in the Keystore -message CreateInvitesRequest { - xmtp.message_contents.InvitationV1.Context context = 1; - repeated xmtp.message_contents.SignedPublicKeyBundle recipients = 2; - uint64 created_ns = 3; -} - // Response to a CreateInviteRequest message CreateInviteResponse { xmtp.message_contents.ConversationReference conversation = 1; bytes payload = 2; } -// Response to a CreateInvitesRequest -message CreateInvitesResponse { - repeated CreateInviteResponse responses = 1; -} - // Request to save a batch of invite messages to the Keystore message SaveInvitesRequest { // Mirrors xmtp.envelope schema @@ -178,8 +158,17 @@ message CreateAuthTokenRequest { optional uint64 timestamp_ns = 1; } +// SaveV1ConversationsRequest is used to save a batch of conversations to the +// built in persistence +message SaveV1ConversationsRequest { + repeated xmtp.message_contents.ConversationReference conversations = 1; +} + +// Placeholder response type for SaveV1Conversations +message SaveV1ConversationsResponse {} + // Response for GetV2Conversations -message GetV2ConversationsResponse { +message GetConversationsResponse { repeated xmtp.message_contents.ConversationReference conversations = 1; } @@ -224,6 +213,32 @@ message SignDigestRequest { } } +// JobType is used to specify the type of job the caller would like info on +enum JobType { + JOB_TYPE_UNSPECIFIED = 0; + JOB_TYPE_REFRESH_V1 = 1; + JOB_TYPE_REFRESH_V2 = 2; +} + +// GetRefreshJobRequest is used to get the last run time of a refresh job +message GetRefreshJobRequest { + JobType job_type = 1; +} + +// GetRefreshJobResponse is used to return the last run time of a refresh job +message GetRefreshJobResponse { + int64 last_run_ns = 1; +} + +// SetRefreshJobRequest is used to set the last run time of a refresh job +message SetRefeshJobRequest { + JobType job_type = 1; + int64 last_run_ns = 2; +} + +// SetRefreshJobResponse is an empty response type +message SetRefreshJobResponse {} + // A mapping of topics to their decrypted invitations message TopicMap { // TopicData wraps the invitation and the timestamp it was created From b4edb3c533d935c4504b13af3b1b63a05d85ba91 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar Date: Wed, 23 Aug 2023 17:31:44 -0700 Subject: [PATCH 2/4] build: add go files --- go/keystore_api/v1/keystore.pb.go | 1187 ++++++++++++++----------- go/message_api/v1/message_api.pb.go | 1 - go/message_contents/ciphertext.pb.go | 1 - go/message_contents/composite.pb.go | 1 - go/message_contents/contact.pb.go | 1 - go/message_contents/invitation.pb.go | 2 - go/message_contents/message.pb.go | 1 - go/message_contents/private_key.pb.go | 4 - go/message_contents/public_key.pb.go | 2 - go/message_contents/signature.pb.go | 1 - 10 files changed, 687 insertions(+), 514 deletions(-) diff --git a/go/keystore_api/v1/keystore.pb.go b/go/keystore_api/v1/keystore.pb.go index ce708433..de7b6213 100644 --- a/go/keystore_api/v1/keystore.pb.go +++ b/go/keystore_api/v1/keystore.pb.go @@ -73,6 +73,56 @@ func (ErrorCode) EnumDescriptor() ([]byte, []int) { return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{0} } +// JobType is used to specify the type of job the caller would like info on +type JobType int32 + +const ( + JobType_JOB_TYPE_UNSPECIFIED JobType = 0 + JobType_JOB_TYPE_REFRESH_V1 JobType = 1 + JobType_JOB_TYPE_REFRESH_V2 JobType = 2 +) + +// Enum value maps for JobType. +var ( + JobType_name = map[int32]string{ + 0: "JOB_TYPE_UNSPECIFIED", + 1: "JOB_TYPE_REFRESH_V1", + 2: "JOB_TYPE_REFRESH_V2", + } + JobType_value = map[string]int32{ + "JOB_TYPE_UNSPECIFIED": 0, + "JOB_TYPE_REFRESH_V1": 1, + "JOB_TYPE_REFRESH_V2": 2, + } +) + +func (x JobType) Enum() *JobType { + p := new(JobType) + *p = x + return p +} + +func (x JobType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JobType) Descriptor() protoreflect.EnumDescriptor { + return file_keystore_api_v1_keystore_proto_enumTypes[1].Descriptor() +} + +func (JobType) Type() protoreflect.EnumType { + return &file_keystore_api_v1_keystore_proto_enumTypes[1] +} + +func (x JobType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JobType.Descriptor instead. +func (JobType) EnumDescriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{1} +} + // Status of the Keystore for the specified wallet address type GetKeystoreStatusResponse_KeystoreStatus int32 @@ -107,11 +157,11 @@ func (x GetKeystoreStatusResponse_KeystoreStatus) String() string { } func (GetKeystoreStatusResponse_KeystoreStatus) Descriptor() protoreflect.EnumDescriptor { - return file_keystore_api_v1_keystore_proto_enumTypes[1].Descriptor() + return file_keystore_api_v1_keystore_proto_enumTypes[2].Descriptor() } func (GetKeystoreStatusResponse_KeystoreStatus) Type() protoreflect.EnumType { - return &file_keystore_api_v1_keystore_proto_enumTypes[1] + return &file_keystore_api_v1_keystore_proto_enumTypes[2] } func (x GetKeystoreStatusResponse_KeystoreStatus) Number() protoreflect.EnumNumber { @@ -120,7 +170,7 @@ func (x GetKeystoreStatusResponse_KeystoreStatus) Number() protoreflect.EnumNumb // Deprecated: Use GetKeystoreStatusResponse_KeystoreStatus.Descriptor instead. func (GetKeystoreStatusResponse_KeystoreStatus) EnumDescriptor() ([]byte, []int) { - return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{17, 0} + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{16, 0} } // Wrapper class for errors from the Keystore API @@ -531,20 +581,18 @@ func (x *CreateInviteRequest) GetCreatedNs() uint64 { return 0 } -// Request to create an invite payload from an existing topic, and store the -// topic keys in the Keystore -type CreateInviteFromTopicRequest struct { +// Response to a CreateInviteRequest +type CreateInviteResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Recipient *message_contents.SignedPublicKeyBundle `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` - ContentTopic string `protobuf:"bytes,2,opt,name=content_topic,json=contentTopic,proto3" json:"content_topic,omitempty"` - CreatedNs uint64 `protobuf:"varint,3,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` + Conversation *message_contents.ConversationReference `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` } -func (x *CreateInviteFromTopicRequest) Reset() { - *x = CreateInviteFromTopicRequest{} +func (x *CreateInviteResponse) Reset() { + *x = CreateInviteResponse{} if protoimpl.UnsafeEnabled { mi := &file_keystore_api_v1_keystore_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -552,13 +600,13 @@ func (x *CreateInviteFromTopicRequest) Reset() { } } -func (x *CreateInviteFromTopicRequest) String() string { +func (x *CreateInviteResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateInviteFromTopicRequest) ProtoMessage() {} +func (*CreateInviteResponse) ProtoMessage() {} -func (x *CreateInviteFromTopicRequest) ProtoReflect() protoreflect.Message { +func (x *CreateInviteResponse) ProtoReflect() protoreflect.Message { mi := &file_keystore_api_v1_keystore_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -570,45 +618,36 @@ func (x *CreateInviteFromTopicRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateInviteFromTopicRequest.ProtoReflect.Descriptor instead. -func (*CreateInviteFromTopicRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateInviteResponse.ProtoReflect.Descriptor instead. +func (*CreateInviteResponse) Descriptor() ([]byte, []int) { return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{8} } -func (x *CreateInviteFromTopicRequest) GetRecipient() *message_contents.SignedPublicKeyBundle { +func (x *CreateInviteResponse) GetConversation() *message_contents.ConversationReference { if x != nil { - return x.Recipient + return x.Conversation } return nil } -func (x *CreateInviteFromTopicRequest) GetContentTopic() string { - if x != nil { - return x.ContentTopic - } - return "" -} - -func (x *CreateInviteFromTopicRequest) GetCreatedNs() uint64 { +func (x *CreateInviteResponse) GetPayload() []byte { if x != nil { - return x.CreatedNs + return x.Payload } - return 0 + return nil } -// Request to create an invite payload, and store the topic keys in the Keystore -type CreateInvitesRequest struct { +// Request to save a batch of invite messages to the Keystore +type SaveInvitesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Context *message_contents.InvitationV1_Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` - Recipients []*message_contents.SignedPublicKeyBundle `protobuf:"bytes,2,rep,name=recipients,proto3" json:"recipients,omitempty"` - CreatedNs uint64 `protobuf:"varint,3,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` + Requests []*SaveInvitesRequest_Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` } -func (x *CreateInvitesRequest) Reset() { - *x = CreateInvitesRequest{} +func (x *SaveInvitesRequest) Reset() { + *x = SaveInvitesRequest{} if protoimpl.UnsafeEnabled { mi := &file_keystore_api_v1_keystore_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -616,13 +655,13 @@ func (x *CreateInvitesRequest) Reset() { } } -func (x *CreateInvitesRequest) String() string { +func (x *SaveInvitesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateInvitesRequest) ProtoMessage() {} +func (*SaveInvitesRequest) ProtoMessage() {} -func (x *CreateInvitesRequest) ProtoReflect() protoreflect.Message { +func (x *SaveInvitesRequest) ProtoReflect() protoreflect.Message { mi := &file_keystore_api_v1_keystore_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -634,44 +673,29 @@ func (x *CreateInvitesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateInvitesRequest.ProtoReflect.Descriptor instead. -func (*CreateInvitesRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SaveInvitesRequest.ProtoReflect.Descriptor instead. +func (*SaveInvitesRequest) Descriptor() ([]byte, []int) { return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{9} } -func (x *CreateInvitesRequest) GetContext() *message_contents.InvitationV1_Context { - if x != nil { - return x.Context - } - return nil -} - -func (x *CreateInvitesRequest) GetRecipients() []*message_contents.SignedPublicKeyBundle { +func (x *SaveInvitesRequest) GetRequests() []*SaveInvitesRequest_Request { if x != nil { - return x.Recipients + return x.Requests } return nil } -func (x *CreateInvitesRequest) GetCreatedNs() uint64 { - if x != nil { - return x.CreatedNs - } - return 0 -} - -// Response to a CreateInviteRequest -type CreateInviteResponse struct { +// Response to a SaveInvitesRequest +type SaveInvitesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Conversation *message_contents.ConversationReference `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation,omitempty"` - Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + Responses []*SaveInvitesResponse_Response `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` } -func (x *CreateInviteResponse) Reset() { - *x = CreateInviteResponse{} +func (x *SaveInvitesResponse) Reset() { + *x = SaveInvitesResponse{} if protoimpl.UnsafeEnabled { mi := &file_keystore_api_v1_keystore_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -679,13 +703,13 @@ func (x *CreateInviteResponse) Reset() { } } -func (x *CreateInviteResponse) String() string { +func (x *SaveInvitesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateInviteResponse) ProtoMessage() {} +func (*SaveInvitesResponse) ProtoMessage() {} -func (x *CreateInviteResponse) ProtoReflect() protoreflect.Message { +func (x *SaveInvitesResponse) ProtoReflect() protoreflect.Message { mi := &file_keystore_api_v1_keystore_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -697,36 +721,29 @@ func (x *CreateInviteResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateInviteResponse.ProtoReflect.Descriptor instead. -func (*CreateInviteResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SaveInvitesResponse.ProtoReflect.Descriptor instead. +func (*SaveInvitesResponse) Descriptor() ([]byte, []int) { return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{10} } -func (x *CreateInviteResponse) GetConversation() *message_contents.ConversationReference { - if x != nil { - return x.Conversation - } - return nil -} - -func (x *CreateInviteResponse) GetPayload() []byte { +func (x *SaveInvitesResponse) GetResponses() []*SaveInvitesResponse_Response { if x != nil { - return x.Payload + return x.Responses } return nil } -// Response to a CreateInvitesRequest -type CreateInvitesResponse struct { +// CreateAuthTokenRequest is used to create an auth token for the XMTP API +type CreateAuthTokenRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Responses []*CreateInviteResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` + TimestampNs *uint64 `protobuf:"varint,1,opt,name=timestamp_ns,json=timestampNs,proto3,oneof" json:"timestamp_ns,omitempty"` } -func (x *CreateInvitesResponse) Reset() { - *x = CreateInvitesResponse{} +func (x *CreateAuthTokenRequest) Reset() { + *x = CreateAuthTokenRequest{} if protoimpl.UnsafeEnabled { mi := &file_keystore_api_v1_keystore_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -734,13 +751,13 @@ func (x *CreateInvitesResponse) Reset() { } } -func (x *CreateInvitesResponse) String() string { +func (x *CreateAuthTokenRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateInvitesResponse) ProtoMessage() {} +func (*CreateAuthTokenRequest) ProtoMessage() {} -func (x *CreateInvitesResponse) ProtoReflect() protoreflect.Message { +func (x *CreateAuthTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_keystore_api_v1_keystore_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -752,29 +769,30 @@ func (x *CreateInvitesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateInvitesResponse.ProtoReflect.Descriptor instead. -func (*CreateInvitesResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateAuthTokenRequest.ProtoReflect.Descriptor instead. +func (*CreateAuthTokenRequest) Descriptor() ([]byte, []int) { return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{11} } -func (x *CreateInvitesResponse) GetResponses() []*CreateInviteResponse { - if x != nil { - return x.Responses +func (x *CreateAuthTokenRequest) GetTimestampNs() uint64 { + if x != nil && x.TimestampNs != nil { + return *x.TimestampNs } - return nil + return 0 } -// Request to save a batch of invite messages to the Keystore -type SaveInvitesRequest struct { +// SaveV1ConversationsRequest is used to save a batch of conversations to the +// built in persistence +type SaveV1ConversationsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Requests []*SaveInvitesRequest_Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` + Conversations []*message_contents.ConversationReference `protobuf:"bytes,1,rep,name=conversations,proto3" json:"conversations,omitempty"` } -func (x *SaveInvitesRequest) Reset() { - *x = SaveInvitesRequest{} +func (x *SaveV1ConversationsRequest) Reset() { + *x = SaveV1ConversationsRequest{} if protoimpl.UnsafeEnabled { mi := &file_keystore_api_v1_keystore_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -782,13 +800,13 @@ func (x *SaveInvitesRequest) Reset() { } } -func (x *SaveInvitesRequest) String() string { +func (x *SaveV1ConversationsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SaveInvitesRequest) ProtoMessage() {} +func (*SaveV1ConversationsRequest) ProtoMessage() {} -func (x *SaveInvitesRequest) ProtoReflect() protoreflect.Message { +func (x *SaveV1ConversationsRequest) ProtoReflect() protoreflect.Message { mi := &file_keystore_api_v1_keystore_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -800,29 +818,27 @@ func (x *SaveInvitesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SaveInvitesRequest.ProtoReflect.Descriptor instead. -func (*SaveInvitesRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SaveV1ConversationsRequest.ProtoReflect.Descriptor instead. +func (*SaveV1ConversationsRequest) Descriptor() ([]byte, []int) { return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{12} } -func (x *SaveInvitesRequest) GetRequests() []*SaveInvitesRequest_Request { +func (x *SaveV1ConversationsRequest) GetConversations() []*message_contents.ConversationReference { if x != nil { - return x.Requests + return x.Conversations } return nil } -// Response to a SaveInvitesRequest -type SaveInvitesResponse struct { +// Placeholder response type for SaveV1Conversations +type SaveV1ConversationsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Responses []*SaveInvitesResponse_Response `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` } -func (x *SaveInvitesResponse) Reset() { - *x = SaveInvitesResponse{} +func (x *SaveV1ConversationsResponse) Reset() { + *x = SaveV1ConversationsResponse{} if protoimpl.UnsafeEnabled { mi := &file_keystore_api_v1_keystore_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -830,13 +846,13 @@ func (x *SaveInvitesResponse) Reset() { } } -func (x *SaveInvitesResponse) String() string { +func (x *SaveV1ConversationsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SaveInvitesResponse) ProtoMessage() {} +func (*SaveV1ConversationsResponse) ProtoMessage() {} -func (x *SaveInvitesResponse) ProtoReflect() protoreflect.Message { +func (x *SaveV1ConversationsResponse) ProtoReflect() protoreflect.Message { mi := &file_keystore_api_v1_keystore_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -848,29 +864,22 @@ func (x *SaveInvitesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SaveInvitesResponse.ProtoReflect.Descriptor instead. -func (*SaveInvitesResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SaveV1ConversationsResponse.ProtoReflect.Descriptor instead. +func (*SaveV1ConversationsResponse) Descriptor() ([]byte, []int) { return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{13} } -func (x *SaveInvitesResponse) GetResponses() []*SaveInvitesResponse_Response { - if x != nil { - return x.Responses - } - return nil -} - -// CreateAuthTokenRequest is used to create an auth token for the XMTP API -type CreateAuthTokenRequest struct { +// Response for GetV2Conversations +type GetConversationsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TimestampNs *uint64 `protobuf:"varint,1,opt,name=timestamp_ns,json=timestampNs,proto3,oneof" json:"timestamp_ns,omitempty"` + Conversations []*message_contents.ConversationReference `protobuf:"bytes,1,rep,name=conversations,proto3" json:"conversations,omitempty"` } -func (x *CreateAuthTokenRequest) Reset() { - *x = CreateAuthTokenRequest{} +func (x *GetConversationsResponse) Reset() { + *x = GetConversationsResponse{} if protoimpl.UnsafeEnabled { mi := &file_keystore_api_v1_keystore_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -878,13 +887,13 @@ func (x *CreateAuthTokenRequest) Reset() { } } -func (x *CreateAuthTokenRequest) String() string { +func (x *GetConversationsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateAuthTokenRequest) ProtoMessage() {} +func (*GetConversationsResponse) ProtoMessage() {} -func (x *CreateAuthTokenRequest) ProtoReflect() protoreflect.Message { +func (x *GetConversationsResponse) ProtoReflect() protoreflect.Message { mi := &file_keystore_api_v1_keystore_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -896,60 +905,12 @@ func (x *CreateAuthTokenRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateAuthTokenRequest.ProtoReflect.Descriptor instead. -func (*CreateAuthTokenRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetConversationsResponse.ProtoReflect.Descriptor instead. +func (*GetConversationsResponse) Descriptor() ([]byte, []int) { return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{14} } -func (x *CreateAuthTokenRequest) GetTimestampNs() uint64 { - if x != nil && x.TimestampNs != nil { - return *x.TimestampNs - } - return 0 -} - -// Response for GetV2Conversations -type GetV2ConversationsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Conversations []*message_contents.ConversationReference `protobuf:"bytes,1,rep,name=conversations,proto3" json:"conversations,omitempty"` -} - -func (x *GetV2ConversationsResponse) Reset() { - *x = GetV2ConversationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetV2ConversationsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetV2ConversationsResponse) ProtoMessage() {} - -func (x *GetV2ConversationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetV2ConversationsResponse.ProtoReflect.Descriptor instead. -func (*GetV2ConversationsResponse) Descriptor() ([]byte, []int) { - return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{15} -} - -func (x *GetV2ConversationsResponse) GetConversations() []*message_contents.ConversationReference { +func (x *GetConversationsResponse) GetConversations() []*message_contents.ConversationReference { if x != nil { return x.Conversations } @@ -969,7 +930,7 @@ type GetKeystoreStatusRequest struct { func (x *GetKeystoreStatusRequest) Reset() { *x = GetKeystoreStatusRequest{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[16] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -982,7 +943,7 @@ func (x *GetKeystoreStatusRequest) String() string { func (*GetKeystoreStatusRequest) ProtoMessage() {} func (x *GetKeystoreStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[16] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -995,7 +956,7 @@ func (x *GetKeystoreStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetKeystoreStatusRequest.ProtoReflect.Descriptor instead. func (*GetKeystoreStatusRequest) Descriptor() ([]byte, []int) { - return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{16} + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{15} } func (x *GetKeystoreStatusRequest) GetWalletAddress() string { @@ -1017,7 +978,7 @@ type GetKeystoreStatusResponse struct { func (x *GetKeystoreStatusResponse) Reset() { *x = GetKeystoreStatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[17] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1030,7 +991,7 @@ func (x *GetKeystoreStatusResponse) String() string { func (*GetKeystoreStatusResponse) ProtoMessage() {} func (x *GetKeystoreStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[17] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1043,7 +1004,7 @@ func (x *GetKeystoreStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetKeystoreStatusResponse.ProtoReflect.Descriptor instead. func (*GetKeystoreStatusResponse) Descriptor() ([]byte, []int) { - return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{17} + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{16} } func (x *GetKeystoreStatusResponse) GetStatus() GetKeystoreStatusResponse_KeystoreStatus { @@ -1061,7 +1022,6 @@ type InitKeystoreRequest struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Bundle: - // // *InitKeystoreRequest_V1 Bundle isInitKeystoreRequest_Bundle `protobuf_oneof:"bundle"` } @@ -1069,7 +1029,7 @@ type InitKeystoreRequest struct { func (x *InitKeystoreRequest) Reset() { *x = InitKeystoreRequest{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[18] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1082,7 +1042,7 @@ func (x *InitKeystoreRequest) String() string { func (*InitKeystoreRequest) ProtoMessage() {} func (x *InitKeystoreRequest) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[18] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1095,7 +1055,7 @@ func (x *InitKeystoreRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InitKeystoreRequest.ProtoReflect.Descriptor instead. func (*InitKeystoreRequest) Descriptor() ([]byte, []int) { - return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{18} + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{17} } func (m *InitKeystoreRequest) GetBundle() isInitKeystoreRequest_Bundle { @@ -1134,7 +1094,7 @@ type InitKeystoreResponse struct { func (x *InitKeystoreResponse) Reset() { *x = InitKeystoreResponse{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[19] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1147,7 +1107,7 @@ func (x *InitKeystoreResponse) String() string { func (*InitKeystoreResponse) ProtoMessage() {} func (x *InitKeystoreResponse) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[19] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1160,7 +1120,7 @@ func (x *InitKeystoreResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use InitKeystoreResponse.ProtoReflect.Descriptor instead. func (*InitKeystoreResponse) Descriptor() ([]byte, []int) { - return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{19} + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{18} } func (x *InitKeystoreResponse) GetError() *KeystoreError { @@ -1179,7 +1139,6 @@ type SignDigestRequest struct { Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"` // Types that are assignable to Signer: - // // *SignDigestRequest_IdentityKey // *SignDigestRequest_PrekeyIndex Signer isSignDigestRequest_Signer `protobuf_oneof:"signer"` @@ -1188,7 +1147,7 @@ type SignDigestRequest struct { func (x *SignDigestRequest) Reset() { *x = SignDigestRequest{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[20] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1201,7 +1160,7 @@ func (x *SignDigestRequest) String() string { func (*SignDigestRequest) ProtoMessage() {} func (x *SignDigestRequest) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[20] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1214,7 +1173,7 @@ func (x *SignDigestRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SignDigestRequest.ProtoReflect.Descriptor instead. func (*SignDigestRequest) Descriptor() ([]byte, []int) { - return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{20} + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{19} } func (x *SignDigestRequest) GetDigest() []byte { @@ -1261,6 +1220,197 @@ func (*SignDigestRequest_IdentityKey) isSignDigestRequest_Signer() {} func (*SignDigestRequest_PrekeyIndex) isSignDigestRequest_Signer() {} +// GetRefreshJobRequest is used to get the last run time of a refresh job +type GetRefreshJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobType JobType `protobuf:"varint,1,opt,name=job_type,json=jobType,proto3,enum=xmtp.keystore_api.v1.JobType" json:"job_type,omitempty"` +} + +func (x *GetRefreshJobRequest) Reset() { + *x = GetRefreshJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRefreshJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRefreshJobRequest) ProtoMessage() {} + +func (x *GetRefreshJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRefreshJobRequest.ProtoReflect.Descriptor instead. +func (*GetRefreshJobRequest) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{20} +} + +func (x *GetRefreshJobRequest) GetJobType() JobType { + if x != nil { + return x.JobType + } + return JobType_JOB_TYPE_UNSPECIFIED +} + +// GetRefreshJobResponse is used to return the last run time of a refresh job +type GetRefreshJobResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LastRunNs int64 `protobuf:"varint,1,opt,name=last_run_ns,json=lastRunNs,proto3" json:"last_run_ns,omitempty"` +} + +func (x *GetRefreshJobResponse) Reset() { + *x = GetRefreshJobResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRefreshJobResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRefreshJobResponse) ProtoMessage() {} + +func (x *GetRefreshJobResponse) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRefreshJobResponse.ProtoReflect.Descriptor instead. +func (*GetRefreshJobResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{21} +} + +func (x *GetRefreshJobResponse) GetLastRunNs() int64 { + if x != nil { + return x.LastRunNs + } + return 0 +} + +// SetRefreshJobRequest is used to set the last run time of a refresh job +type SetRefeshJobRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobType JobType `protobuf:"varint,1,opt,name=job_type,json=jobType,proto3,enum=xmtp.keystore_api.v1.JobType" json:"job_type,omitempty"` + LastRunNs int64 `protobuf:"varint,2,opt,name=last_run_ns,json=lastRunNs,proto3" json:"last_run_ns,omitempty"` +} + +func (x *SetRefeshJobRequest) Reset() { + *x = SetRefeshJobRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetRefeshJobRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetRefeshJobRequest) ProtoMessage() {} + +func (x *SetRefeshJobRequest) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetRefeshJobRequest.ProtoReflect.Descriptor instead. +func (*SetRefeshJobRequest) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{22} +} + +func (x *SetRefeshJobRequest) GetJobType() JobType { + if x != nil { + return x.JobType + } + return JobType_JOB_TYPE_UNSPECIFIED +} + +func (x *SetRefeshJobRequest) GetLastRunNs() int64 { + if x != nil { + return x.LastRunNs + } + return 0 +} + +// SetRefreshJobResponse is an empty response type +type SetRefreshJobResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetRefreshJobResponse) Reset() { + *x = SetRefreshJobResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetRefreshJobResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetRefreshJobResponse) ProtoMessage() {} + +func (x *SetRefreshJobResponse) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetRefreshJobResponse.ProtoReflect.Descriptor instead. +func (*SetRefreshJobResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{23} +} + // A mapping of topics to their decrypted invitations type TopicMap struct { state protoimpl.MessageState @@ -1273,7 +1423,7 @@ type TopicMap struct { func (x *TopicMap) Reset() { *x = TopicMap{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[21] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1286,7 +1436,7 @@ func (x *TopicMap) String() string { func (*TopicMap) ProtoMessage() {} func (x *TopicMap) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[21] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1299,7 +1449,7 @@ func (x *TopicMap) ProtoReflect() protoreflect.Message { // Deprecated: Use TopicMap.ProtoReflect.Descriptor instead. func (*TopicMap) Descriptor() ([]byte, []int) { - return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{21} + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{24} } func (x *TopicMap) GetTopics() map[string]*TopicMap_TopicData { @@ -1324,7 +1474,7 @@ type DecryptV1Request_Request struct { func (x *DecryptV1Request_Request) Reset() { *x = DecryptV1Request_Request{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[22] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1337,7 +1487,7 @@ func (x *DecryptV1Request_Request) String() string { func (*DecryptV1Request_Request) ProtoMessage() {} func (x *DecryptV1Request_Request) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[22] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1388,7 +1538,6 @@ type DecryptResponse_Response struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Response: - // // *DecryptResponse_Response_Result // *DecryptResponse_Response_Error Response isDecryptResponse_Response_Response `protobuf_oneof:"response"` @@ -1397,7 +1546,7 @@ type DecryptResponse_Response struct { func (x *DecryptResponse_Response) Reset() { *x = DecryptResponse_Response{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[23] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1410,7 +1559,7 @@ func (x *DecryptResponse_Response) String() string { func (*DecryptResponse_Response) ProtoMessage() {} func (x *DecryptResponse_Response) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[23] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1475,7 +1624,7 @@ type DecryptResponse_Response_Success struct { func (x *DecryptResponse_Response_Success) Reset() { *x = DecryptResponse_Response_Success{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[24] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1488,7 +1637,7 @@ func (x *DecryptResponse_Response_Success) String() string { func (*DecryptResponse_Response_Success) ProtoMessage() {} func (x *DecryptResponse_Response_Success) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[24] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1525,7 +1674,7 @@ type DecryptV2Request_Request struct { func (x *DecryptV2Request_Request) Reset() { *x = DecryptV2Request_Request{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[25] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1538,7 +1687,7 @@ func (x *DecryptV2Request_Request) String() string { func (*DecryptV2Request_Request) ProtoMessage() {} func (x *DecryptV2Request_Request) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[25] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1589,7 +1738,7 @@ type EncryptV1Request_Request struct { func (x *EncryptV1Request_Request) Reset() { *x = EncryptV1Request_Request{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[26] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1602,7 +1751,7 @@ func (x *EncryptV1Request_Request) String() string { func (*EncryptV1Request_Request) ProtoMessage() {} func (x *EncryptV1Request_Request) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[26] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1646,7 +1795,6 @@ type EncryptResponse_Response struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Response: - // // *EncryptResponse_Response_Result // *EncryptResponse_Response_Error Response isEncryptResponse_Response_Response `protobuf_oneof:"response"` @@ -1655,7 +1803,7 @@ type EncryptResponse_Response struct { func (x *EncryptResponse_Response) Reset() { *x = EncryptResponse_Response{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[27] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1668,7 +1816,7 @@ func (x *EncryptResponse_Response) String() string { func (*EncryptResponse_Response) ProtoMessage() {} func (x *EncryptResponse_Response) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[27] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1733,7 +1881,7 @@ type EncryptResponse_Response_Success struct { func (x *EncryptResponse_Response_Success) Reset() { *x = EncryptResponse_Response_Success{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[28] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1746,7 +1894,7 @@ func (x *EncryptResponse_Response_Success) String() string { func (*EncryptResponse_Response_Success) ProtoMessage() {} func (x *EncryptResponse_Response_Success) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[28] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1783,7 +1931,7 @@ type EncryptV2Request_Request struct { func (x *EncryptV2Request_Request) Reset() { *x = EncryptV2Request_Request{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[29] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1796,7 +1944,7 @@ func (x *EncryptV2Request_Request) String() string { func (*EncryptV2Request_Request) ProtoMessage() {} func (x *EncryptV2Request_Request) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[29] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1847,7 +1995,7 @@ type SaveInvitesRequest_Request struct { func (x *SaveInvitesRequest_Request) Reset() { *x = SaveInvitesRequest_Request{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[30] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1860,7 +2008,7 @@ func (x *SaveInvitesRequest_Request) String() string { func (*SaveInvitesRequest_Request) ProtoMessage() {} func (x *SaveInvitesRequest_Request) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[30] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1873,7 +2021,7 @@ func (x *SaveInvitesRequest_Request) ProtoReflect() protoreflect.Message { // Deprecated: Use SaveInvitesRequest_Request.ProtoReflect.Descriptor instead. func (*SaveInvitesRequest_Request) Descriptor() ([]byte, []int) { - return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{12, 0} + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{9, 0} } func (x *SaveInvitesRequest_Request) GetContentTopic() string { @@ -1904,7 +2052,6 @@ type SaveInvitesResponse_Response struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Response: - // // *SaveInvitesResponse_Response_Result // *SaveInvitesResponse_Response_Error Response isSaveInvitesResponse_Response_Response `protobuf_oneof:"response"` @@ -1913,7 +2060,7 @@ type SaveInvitesResponse_Response struct { func (x *SaveInvitesResponse_Response) Reset() { *x = SaveInvitesResponse_Response{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[31] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1926,7 +2073,7 @@ func (x *SaveInvitesResponse_Response) String() string { func (*SaveInvitesResponse_Response) ProtoMessage() {} func (x *SaveInvitesResponse_Response) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[31] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1939,7 +2086,7 @@ func (x *SaveInvitesResponse_Response) ProtoReflect() protoreflect.Message { // Deprecated: Use SaveInvitesResponse_Response.ProtoReflect.Descriptor instead. func (*SaveInvitesResponse_Response) Descriptor() ([]byte, []int) { - return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{13, 0} + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{10, 0} } func (m *SaveInvitesResponse_Response) GetResponse() isSaveInvitesResponse_Response_Response { @@ -1991,7 +2138,7 @@ type SaveInvitesResponse_Response_Success struct { func (x *SaveInvitesResponse_Response_Success) Reset() { *x = SaveInvitesResponse_Response_Success{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[32] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2004,7 +2151,7 @@ func (x *SaveInvitesResponse_Response_Success) String() string { func (*SaveInvitesResponse_Response_Success) ProtoMessage() {} func (x *SaveInvitesResponse_Response_Success) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[32] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2017,7 +2164,7 @@ func (x *SaveInvitesResponse_Response_Success) ProtoReflect() protoreflect.Messa // Deprecated: Use SaveInvitesResponse_Response_Success.ProtoReflect.Descriptor instead. func (*SaveInvitesResponse_Response_Success) Descriptor() ([]byte, []int) { - return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{13, 0, 0} + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{10, 0, 0} } func (x *SaveInvitesResponse_Response_Success) GetConversation() *message_contents.ConversationReference { @@ -2041,7 +2188,7 @@ type TopicMap_TopicData struct { func (x *TopicMap_TopicData) Reset() { *x = TopicMap_TopicData{} if protoimpl.UnsafeEnabled { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[33] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2054,7 +2201,7 @@ func (x *TopicMap_TopicData) String() string { func (*TopicMap_TopicData) ProtoMessage() {} func (x *TopicMap_TopicData) ProtoReflect() protoreflect.Message { - mi := &file_keystore_api_v1_keystore_proto_msgTypes[33] + mi := &file_keystore_api_v1_keystore_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2067,7 +2214,7 @@ func (x *TopicMap_TopicData) ProtoReflect() protoreflect.Message { // Deprecated: Use TopicMap_TopicData.ProtoReflect.Descriptor instead. func (*TopicMap_TopicData) Descriptor() ([]byte, []int) { - return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{21, 0} + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{24, 0} } func (x *TopicMap_TopicData) GetCreatedNs() uint64 { @@ -2230,165 +2377,166 @@ var file_keystore_api_v1_keystore_proto_rawDesc = []byte{ 0x63, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x4e, 0x73, 0x22, 0xae, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, - 0x6e, 0x76, 0x69, 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, - 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x70, - 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x4e, 0x73, 0x22, 0xca, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, - 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x56, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x4c, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, - 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x4e, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x76, - 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0c, 0x63, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, - 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, - 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x61, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x48, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0xcf, 0x01, 0x0a, 0x12, 0x53, - 0x61, 0x76, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x4c, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x49, - 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x1a, - 0x6b, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, - 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x4e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xf0, 0x02, 0x0a, - 0x13, 0x53, 0x61, 0x76, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, - 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x61, 0x76, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x1a, 0x86, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x49, - 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, - 0x00, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x65, 0x64, 0x4e, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, + 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xcf, 0x01, 0x0a, 0x12, 0x53, 0x61, + 0x76, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x4c, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x1a, 0x6b, + 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x21, + 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4e, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xf0, 0x02, 0x0a, 0x13, + 0x53, 0x61, 0x76, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, + 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, + 0x76, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x1a, 0x86, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x54, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, + 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, + 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4b, + 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x5b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x50, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, + 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, + 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4e, 0x73, 0x88, 0x01, 0x01, + 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, + 0x73, 0x22, 0x70, 0x0a, 0x1a, 0x53, 0x61, 0x76, 0x65, 0x56, 0x31, 0x43, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x52, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x61, 0x76, 0x65, 0x56, 0x31, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x6e, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, + 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x41, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, + 0x0a, 0x0e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xea, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x75, 0x0a, 0x0e, 0x4b, + 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, + 0x1b, 0x4b, 0x45, 0x59, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, + 0x0a, 0x1d, 0x4b, 0x45, 0x59, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x55, 0x4e, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, + 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x4b, 0x45, 0x59, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, + 0x10, 0x02, 0x22, 0x5c, 0x0a, 0x13, 0x49, 0x6e, 0x69, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x02, 0x76, 0x31, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x56, 0x31, + 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x42, 0x08, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x22, 0x51, 0x0a, 0x14, 0x49, 0x6e, 0x69, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, + 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4b, + 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x22, 0x7f, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x69, 0x67, 0x65, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x12, 0x23, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x6b, 0x65, 0x79, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0b, 0x70, + 0x72, 0x65, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x22, 0x50, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x08, + 0x6a, 0x6f, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x6a, + 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x22, 0x37, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1e, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x4e, 0x73, 0x22, + 0x6f, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x73, 0x68, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x5b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x12, 0x50, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x51, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0c, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, - 0x00, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4e, 0x73, 0x88, 0x01, - 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, - 0x6e, 0x73, 0x22, 0x70, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x56, 0x32, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x52, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x41, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xea, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4b, - 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x75, 0x0a, - 0x0e, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x1f, 0x0a, 0x1b, 0x4b, 0x45, 0x59, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x21, 0x0a, 0x1d, 0x4b, 0x45, 0x59, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x45, - 0x44, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x4b, 0x45, 0x59, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, - 0x45, 0x44, 0x10, 0x02, 0x22, 0x5c, 0x0a, 0x13, 0x49, 0x6e, 0x69, 0x74, 0x4b, 0x65, 0x79, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x02, 0x76, - 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, - 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x42, 0x08, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x22, 0x51, 0x0a, 0x14, 0x49, 0x6e, 0x69, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, - 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x78, 0x6d, 0x74, 0x70, - 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x7f, 0x0a, 0x11, 0x53, 0x69, 0x67, 0x6e, 0x44, 0x69, 0x67, - 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, - 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, - 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x6b, 0x65, - 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, - 0x0b, 0x70, 0x72, 0x65, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x08, 0x0a, 0x06, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0xc8, 0x02, 0x0a, 0x08, 0x54, 0x6f, 0x70, 0x69, 0x63, - 0x4d, 0x61, 0x70, 0x12, 0x42, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, - 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x1a, 0x92, 0x01, 0x0a, 0x09, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x4e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x0a, 0x69, 0x6e, 0x76, 0x69, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x78, 0x6d, - 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x31, - 0x52, 0x0a, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x63, 0x0a, 0x0b, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3e, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, - 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x6f, 0x70, - 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x2a, 0x68, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, - 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, - 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, - 0x4e, 0x47, 0x5f, 0x50, 0x52, 0x45, 0x4b, 0x45, 0x59, 0x10, 0x02, 0x42, 0x4d, 0x0a, 0x1e, 0x6f, - 0x72, 0x67, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x6b, 0x65, - 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x5a, 0x2b, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x6f, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1e, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x4e, 0x73, + 0x22, 0x17, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc8, 0x02, 0x0a, 0x08, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x4d, 0x61, 0x70, 0x12, 0x42, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, + 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x4d, 0x61, 0x70, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x1a, 0x92, 0x01, 0x0a, 0x09, 0x54, + 0x6f, 0x70, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x65, 0x65, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x65, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x0a, 0x69, 0x6e, + 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x56, 0x31, 0x52, 0x0a, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, + 0x63, 0x0a, 0x0b, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x3e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4d, 0x61, 0x70, 0x2e, + 0x54, 0x6f, 0x70, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x68, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, + 0x18, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x5f, 0x4d, 0x41, 0x54, + 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x52, 0x45, 0x4b, 0x45, 0x59, 0x10, 0x02, 0x2a, 0x55, + 0x0a, 0x07, 0x4a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4a, 0x4f, 0x42, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, 0x5f, 0x56, 0x31, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, + 0x4a, 0x4f, 0x42, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, + 0x5f, 0x56, 0x32, 0x10, 0x02, 0x42, 0x4d, 0x0a, 0x1e, 0x6f, 0x72, 0x67, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, + 0x33, 0x2f, 0x67, 0x6f, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2403,95 +2551,98 @@ func file_keystore_api_v1_keystore_proto_rawDescGZIP() []byte { return file_keystore_api_v1_keystore_proto_rawDescData } -var file_keystore_api_v1_keystore_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_keystore_api_v1_keystore_proto_msgTypes = make([]protoimpl.MessageInfo, 35) +var file_keystore_api_v1_keystore_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_keystore_api_v1_keystore_proto_msgTypes = make([]protoimpl.MessageInfo, 38) var file_keystore_api_v1_keystore_proto_goTypes = []interface{}{ (ErrorCode)(0), // 0: xmtp.keystore_api.v1.ErrorCode - (GetKeystoreStatusResponse_KeystoreStatus)(0), // 1: xmtp.keystore_api.v1.GetKeystoreStatusResponse.KeystoreStatus - (*KeystoreError)(nil), // 2: xmtp.keystore_api.v1.KeystoreError - (*DecryptV1Request)(nil), // 3: xmtp.keystore_api.v1.DecryptV1Request - (*DecryptResponse)(nil), // 4: xmtp.keystore_api.v1.DecryptResponse - (*DecryptV2Request)(nil), // 5: xmtp.keystore_api.v1.DecryptV2Request - (*EncryptV1Request)(nil), // 6: xmtp.keystore_api.v1.EncryptV1Request - (*EncryptResponse)(nil), // 7: xmtp.keystore_api.v1.EncryptResponse - (*EncryptV2Request)(nil), // 8: xmtp.keystore_api.v1.EncryptV2Request - (*CreateInviteRequest)(nil), // 9: xmtp.keystore_api.v1.CreateInviteRequest - (*CreateInviteFromTopicRequest)(nil), // 10: xmtp.keystore_api.v1.CreateInviteFromTopicRequest - (*CreateInvitesRequest)(nil), // 11: xmtp.keystore_api.v1.CreateInvitesRequest - (*CreateInviteResponse)(nil), // 12: xmtp.keystore_api.v1.CreateInviteResponse - (*CreateInvitesResponse)(nil), // 13: xmtp.keystore_api.v1.CreateInvitesResponse - (*SaveInvitesRequest)(nil), // 14: xmtp.keystore_api.v1.SaveInvitesRequest - (*SaveInvitesResponse)(nil), // 15: xmtp.keystore_api.v1.SaveInvitesResponse - (*CreateAuthTokenRequest)(nil), // 16: xmtp.keystore_api.v1.CreateAuthTokenRequest - (*GetV2ConversationsResponse)(nil), // 17: xmtp.keystore_api.v1.GetV2ConversationsResponse + (JobType)(0), // 1: xmtp.keystore_api.v1.JobType + (GetKeystoreStatusResponse_KeystoreStatus)(0), // 2: xmtp.keystore_api.v1.GetKeystoreStatusResponse.KeystoreStatus + (*KeystoreError)(nil), // 3: xmtp.keystore_api.v1.KeystoreError + (*DecryptV1Request)(nil), // 4: xmtp.keystore_api.v1.DecryptV1Request + (*DecryptResponse)(nil), // 5: xmtp.keystore_api.v1.DecryptResponse + (*DecryptV2Request)(nil), // 6: xmtp.keystore_api.v1.DecryptV2Request + (*EncryptV1Request)(nil), // 7: xmtp.keystore_api.v1.EncryptV1Request + (*EncryptResponse)(nil), // 8: xmtp.keystore_api.v1.EncryptResponse + (*EncryptV2Request)(nil), // 9: xmtp.keystore_api.v1.EncryptV2Request + (*CreateInviteRequest)(nil), // 10: xmtp.keystore_api.v1.CreateInviteRequest + (*CreateInviteResponse)(nil), // 11: xmtp.keystore_api.v1.CreateInviteResponse + (*SaveInvitesRequest)(nil), // 12: xmtp.keystore_api.v1.SaveInvitesRequest + (*SaveInvitesResponse)(nil), // 13: xmtp.keystore_api.v1.SaveInvitesResponse + (*CreateAuthTokenRequest)(nil), // 14: xmtp.keystore_api.v1.CreateAuthTokenRequest + (*SaveV1ConversationsRequest)(nil), // 15: xmtp.keystore_api.v1.SaveV1ConversationsRequest + (*SaveV1ConversationsResponse)(nil), // 16: xmtp.keystore_api.v1.SaveV1ConversationsResponse + (*GetConversationsResponse)(nil), // 17: xmtp.keystore_api.v1.GetConversationsResponse (*GetKeystoreStatusRequest)(nil), // 18: xmtp.keystore_api.v1.GetKeystoreStatusRequest (*GetKeystoreStatusResponse)(nil), // 19: xmtp.keystore_api.v1.GetKeystoreStatusResponse (*InitKeystoreRequest)(nil), // 20: xmtp.keystore_api.v1.InitKeystoreRequest (*InitKeystoreResponse)(nil), // 21: xmtp.keystore_api.v1.InitKeystoreResponse (*SignDigestRequest)(nil), // 22: xmtp.keystore_api.v1.SignDigestRequest - (*TopicMap)(nil), // 23: xmtp.keystore_api.v1.TopicMap - (*DecryptV1Request_Request)(nil), // 24: xmtp.keystore_api.v1.DecryptV1Request.Request - (*DecryptResponse_Response)(nil), // 25: xmtp.keystore_api.v1.DecryptResponse.Response - (*DecryptResponse_Response_Success)(nil), // 26: xmtp.keystore_api.v1.DecryptResponse.Response.Success - (*DecryptV2Request_Request)(nil), // 27: xmtp.keystore_api.v1.DecryptV2Request.Request - (*EncryptV1Request_Request)(nil), // 28: xmtp.keystore_api.v1.EncryptV1Request.Request - (*EncryptResponse_Response)(nil), // 29: xmtp.keystore_api.v1.EncryptResponse.Response - (*EncryptResponse_Response_Success)(nil), // 30: xmtp.keystore_api.v1.EncryptResponse.Response.Success - (*EncryptV2Request_Request)(nil), // 31: xmtp.keystore_api.v1.EncryptV2Request.Request - (*SaveInvitesRequest_Request)(nil), // 32: xmtp.keystore_api.v1.SaveInvitesRequest.Request - (*SaveInvitesResponse_Response)(nil), // 33: xmtp.keystore_api.v1.SaveInvitesResponse.Response - (*SaveInvitesResponse_Response_Success)(nil), // 34: xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success - (*TopicMap_TopicData)(nil), // 35: xmtp.keystore_api.v1.TopicMap.TopicData - nil, // 36: xmtp.keystore_api.v1.TopicMap.TopicsEntry - (*message_contents.InvitationV1_Context)(nil), // 37: xmtp.message_contents.InvitationV1.Context - (*message_contents.SignedPublicKeyBundle)(nil), // 38: xmtp.message_contents.SignedPublicKeyBundle - (*message_contents.ConversationReference)(nil), // 39: xmtp.message_contents.ConversationReference - (*message_contents.PrivateKeyBundleV1)(nil), // 40: xmtp.message_contents.PrivateKeyBundleV1 - (*message_contents.Ciphertext)(nil), // 41: xmtp.message_contents.Ciphertext - (*message_contents.PublicKeyBundle)(nil), // 42: xmtp.message_contents.PublicKeyBundle - (*message_contents.InvitationV1)(nil), // 43: xmtp.message_contents.InvitationV1 + (*GetRefreshJobRequest)(nil), // 23: xmtp.keystore_api.v1.GetRefreshJobRequest + (*GetRefreshJobResponse)(nil), // 24: xmtp.keystore_api.v1.GetRefreshJobResponse + (*SetRefeshJobRequest)(nil), // 25: xmtp.keystore_api.v1.SetRefeshJobRequest + (*SetRefreshJobResponse)(nil), // 26: xmtp.keystore_api.v1.SetRefreshJobResponse + (*TopicMap)(nil), // 27: xmtp.keystore_api.v1.TopicMap + (*DecryptV1Request_Request)(nil), // 28: xmtp.keystore_api.v1.DecryptV1Request.Request + (*DecryptResponse_Response)(nil), // 29: xmtp.keystore_api.v1.DecryptResponse.Response + (*DecryptResponse_Response_Success)(nil), // 30: xmtp.keystore_api.v1.DecryptResponse.Response.Success + (*DecryptV2Request_Request)(nil), // 31: xmtp.keystore_api.v1.DecryptV2Request.Request + (*EncryptV1Request_Request)(nil), // 32: xmtp.keystore_api.v1.EncryptV1Request.Request + (*EncryptResponse_Response)(nil), // 33: xmtp.keystore_api.v1.EncryptResponse.Response + (*EncryptResponse_Response_Success)(nil), // 34: xmtp.keystore_api.v1.EncryptResponse.Response.Success + (*EncryptV2Request_Request)(nil), // 35: xmtp.keystore_api.v1.EncryptV2Request.Request + (*SaveInvitesRequest_Request)(nil), // 36: xmtp.keystore_api.v1.SaveInvitesRequest.Request + (*SaveInvitesResponse_Response)(nil), // 37: xmtp.keystore_api.v1.SaveInvitesResponse.Response + (*SaveInvitesResponse_Response_Success)(nil), // 38: xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success + (*TopicMap_TopicData)(nil), // 39: xmtp.keystore_api.v1.TopicMap.TopicData + nil, // 40: xmtp.keystore_api.v1.TopicMap.TopicsEntry + (*message_contents.InvitationV1_Context)(nil), // 41: xmtp.message_contents.InvitationV1.Context + (*message_contents.SignedPublicKeyBundle)(nil), // 42: xmtp.message_contents.SignedPublicKeyBundle + (*message_contents.ConversationReference)(nil), // 43: xmtp.message_contents.ConversationReference + (*message_contents.PrivateKeyBundleV1)(nil), // 44: xmtp.message_contents.PrivateKeyBundleV1 + (*message_contents.Ciphertext)(nil), // 45: xmtp.message_contents.Ciphertext + (*message_contents.PublicKeyBundle)(nil), // 46: xmtp.message_contents.PublicKeyBundle + (*message_contents.InvitationV1)(nil), // 47: xmtp.message_contents.InvitationV1 } var file_keystore_api_v1_keystore_proto_depIdxs = []int32{ 0, // 0: xmtp.keystore_api.v1.KeystoreError.code:type_name -> xmtp.keystore_api.v1.ErrorCode - 24, // 1: xmtp.keystore_api.v1.DecryptV1Request.requests:type_name -> xmtp.keystore_api.v1.DecryptV1Request.Request - 25, // 2: xmtp.keystore_api.v1.DecryptResponse.responses:type_name -> xmtp.keystore_api.v1.DecryptResponse.Response - 27, // 3: xmtp.keystore_api.v1.DecryptV2Request.requests:type_name -> xmtp.keystore_api.v1.DecryptV2Request.Request - 28, // 4: xmtp.keystore_api.v1.EncryptV1Request.requests:type_name -> xmtp.keystore_api.v1.EncryptV1Request.Request - 29, // 5: xmtp.keystore_api.v1.EncryptResponse.responses:type_name -> xmtp.keystore_api.v1.EncryptResponse.Response - 31, // 6: xmtp.keystore_api.v1.EncryptV2Request.requests:type_name -> xmtp.keystore_api.v1.EncryptV2Request.Request - 37, // 7: xmtp.keystore_api.v1.CreateInviteRequest.context:type_name -> xmtp.message_contents.InvitationV1.Context - 38, // 8: xmtp.keystore_api.v1.CreateInviteRequest.recipient:type_name -> xmtp.message_contents.SignedPublicKeyBundle - 38, // 9: xmtp.keystore_api.v1.CreateInviteFromTopicRequest.recipient:type_name -> xmtp.message_contents.SignedPublicKeyBundle - 37, // 10: xmtp.keystore_api.v1.CreateInvitesRequest.context:type_name -> xmtp.message_contents.InvitationV1.Context - 38, // 11: xmtp.keystore_api.v1.CreateInvitesRequest.recipients:type_name -> xmtp.message_contents.SignedPublicKeyBundle - 39, // 12: xmtp.keystore_api.v1.CreateInviteResponse.conversation:type_name -> xmtp.message_contents.ConversationReference - 12, // 13: xmtp.keystore_api.v1.CreateInvitesResponse.responses:type_name -> xmtp.keystore_api.v1.CreateInviteResponse - 32, // 14: xmtp.keystore_api.v1.SaveInvitesRequest.requests:type_name -> xmtp.keystore_api.v1.SaveInvitesRequest.Request - 33, // 15: xmtp.keystore_api.v1.SaveInvitesResponse.responses:type_name -> xmtp.keystore_api.v1.SaveInvitesResponse.Response - 39, // 16: xmtp.keystore_api.v1.GetV2ConversationsResponse.conversations:type_name -> xmtp.message_contents.ConversationReference - 1, // 17: xmtp.keystore_api.v1.GetKeystoreStatusResponse.status:type_name -> xmtp.keystore_api.v1.GetKeystoreStatusResponse.KeystoreStatus - 40, // 18: xmtp.keystore_api.v1.InitKeystoreRequest.v1:type_name -> xmtp.message_contents.PrivateKeyBundleV1 - 2, // 19: xmtp.keystore_api.v1.InitKeystoreResponse.error:type_name -> xmtp.keystore_api.v1.KeystoreError - 36, // 20: xmtp.keystore_api.v1.TopicMap.topics:type_name -> xmtp.keystore_api.v1.TopicMap.TopicsEntry - 41, // 21: xmtp.keystore_api.v1.DecryptV1Request.Request.payload:type_name -> xmtp.message_contents.Ciphertext - 42, // 22: xmtp.keystore_api.v1.DecryptV1Request.Request.peer_keys:type_name -> xmtp.message_contents.PublicKeyBundle - 26, // 23: xmtp.keystore_api.v1.DecryptResponse.Response.result:type_name -> xmtp.keystore_api.v1.DecryptResponse.Response.Success - 2, // 24: xmtp.keystore_api.v1.DecryptResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError - 41, // 25: xmtp.keystore_api.v1.DecryptV2Request.Request.payload:type_name -> xmtp.message_contents.Ciphertext - 42, // 26: xmtp.keystore_api.v1.EncryptV1Request.Request.recipient:type_name -> xmtp.message_contents.PublicKeyBundle - 30, // 27: xmtp.keystore_api.v1.EncryptResponse.Response.result:type_name -> xmtp.keystore_api.v1.EncryptResponse.Response.Success - 2, // 28: xmtp.keystore_api.v1.EncryptResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError - 41, // 29: xmtp.keystore_api.v1.EncryptResponse.Response.Success.encrypted:type_name -> xmtp.message_contents.Ciphertext - 34, // 30: xmtp.keystore_api.v1.SaveInvitesResponse.Response.result:type_name -> xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success - 2, // 31: xmtp.keystore_api.v1.SaveInvitesResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError - 39, // 32: xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success.conversation:type_name -> xmtp.message_contents.ConversationReference - 43, // 33: xmtp.keystore_api.v1.TopicMap.TopicData.invitation:type_name -> xmtp.message_contents.InvitationV1 - 35, // 34: xmtp.keystore_api.v1.TopicMap.TopicsEntry.value:type_name -> xmtp.keystore_api.v1.TopicMap.TopicData - 35, // [35:35] is the sub-list for method output_type - 35, // [35:35] is the sub-list for method input_type - 35, // [35:35] is the sub-list for extension type_name - 35, // [35:35] is the sub-list for extension extendee - 0, // [0:35] is the sub-list for field type_name + 28, // 1: xmtp.keystore_api.v1.DecryptV1Request.requests:type_name -> xmtp.keystore_api.v1.DecryptV1Request.Request + 29, // 2: xmtp.keystore_api.v1.DecryptResponse.responses:type_name -> xmtp.keystore_api.v1.DecryptResponse.Response + 31, // 3: xmtp.keystore_api.v1.DecryptV2Request.requests:type_name -> xmtp.keystore_api.v1.DecryptV2Request.Request + 32, // 4: xmtp.keystore_api.v1.EncryptV1Request.requests:type_name -> xmtp.keystore_api.v1.EncryptV1Request.Request + 33, // 5: xmtp.keystore_api.v1.EncryptResponse.responses:type_name -> xmtp.keystore_api.v1.EncryptResponse.Response + 35, // 6: xmtp.keystore_api.v1.EncryptV2Request.requests:type_name -> xmtp.keystore_api.v1.EncryptV2Request.Request + 41, // 7: xmtp.keystore_api.v1.CreateInviteRequest.context:type_name -> xmtp.message_contents.InvitationV1.Context + 42, // 8: xmtp.keystore_api.v1.CreateInviteRequest.recipient:type_name -> xmtp.message_contents.SignedPublicKeyBundle + 43, // 9: xmtp.keystore_api.v1.CreateInviteResponse.conversation:type_name -> xmtp.message_contents.ConversationReference + 36, // 10: xmtp.keystore_api.v1.SaveInvitesRequest.requests:type_name -> xmtp.keystore_api.v1.SaveInvitesRequest.Request + 37, // 11: xmtp.keystore_api.v1.SaveInvitesResponse.responses:type_name -> xmtp.keystore_api.v1.SaveInvitesResponse.Response + 43, // 12: xmtp.keystore_api.v1.SaveV1ConversationsRequest.conversations:type_name -> xmtp.message_contents.ConversationReference + 43, // 13: xmtp.keystore_api.v1.GetConversationsResponse.conversations:type_name -> xmtp.message_contents.ConversationReference + 2, // 14: xmtp.keystore_api.v1.GetKeystoreStatusResponse.status:type_name -> xmtp.keystore_api.v1.GetKeystoreStatusResponse.KeystoreStatus + 44, // 15: xmtp.keystore_api.v1.InitKeystoreRequest.v1:type_name -> xmtp.message_contents.PrivateKeyBundleV1 + 3, // 16: xmtp.keystore_api.v1.InitKeystoreResponse.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 1, // 17: xmtp.keystore_api.v1.GetRefreshJobRequest.job_type:type_name -> xmtp.keystore_api.v1.JobType + 1, // 18: xmtp.keystore_api.v1.SetRefeshJobRequest.job_type:type_name -> xmtp.keystore_api.v1.JobType + 40, // 19: xmtp.keystore_api.v1.TopicMap.topics:type_name -> xmtp.keystore_api.v1.TopicMap.TopicsEntry + 45, // 20: xmtp.keystore_api.v1.DecryptV1Request.Request.payload:type_name -> xmtp.message_contents.Ciphertext + 46, // 21: xmtp.keystore_api.v1.DecryptV1Request.Request.peer_keys:type_name -> xmtp.message_contents.PublicKeyBundle + 30, // 22: xmtp.keystore_api.v1.DecryptResponse.Response.result:type_name -> xmtp.keystore_api.v1.DecryptResponse.Response.Success + 3, // 23: xmtp.keystore_api.v1.DecryptResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 45, // 24: xmtp.keystore_api.v1.DecryptV2Request.Request.payload:type_name -> xmtp.message_contents.Ciphertext + 46, // 25: xmtp.keystore_api.v1.EncryptV1Request.Request.recipient:type_name -> xmtp.message_contents.PublicKeyBundle + 34, // 26: xmtp.keystore_api.v1.EncryptResponse.Response.result:type_name -> xmtp.keystore_api.v1.EncryptResponse.Response.Success + 3, // 27: xmtp.keystore_api.v1.EncryptResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 45, // 28: xmtp.keystore_api.v1.EncryptResponse.Response.Success.encrypted:type_name -> xmtp.message_contents.Ciphertext + 38, // 29: xmtp.keystore_api.v1.SaveInvitesResponse.Response.result:type_name -> xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success + 3, // 30: xmtp.keystore_api.v1.SaveInvitesResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 43, // 31: xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success.conversation:type_name -> xmtp.message_contents.ConversationReference + 47, // 32: xmtp.keystore_api.v1.TopicMap.TopicData.invitation:type_name -> xmtp.message_contents.InvitationV1 + 39, // 33: xmtp.keystore_api.v1.TopicMap.TopicsEntry.value:type_name -> xmtp.keystore_api.v1.TopicMap.TopicData + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name } func init() { file_keystore_api_v1_keystore_proto_init() } @@ -2597,7 +2748,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateInviteFromTopicRequest); i { + switch v := v.(*CreateInviteResponse); i { case 0: return &v.state case 1: @@ -2609,7 +2760,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateInvitesRequest); i { + switch v := v.(*SaveInvitesRequest); i { case 0: return &v.state case 1: @@ -2621,7 +2772,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateInviteResponse); i { + switch v := v.(*SaveInvitesResponse); i { case 0: return &v.state case 1: @@ -2633,7 +2784,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateInvitesResponse); i { + switch v := v.(*CreateAuthTokenRequest); i { case 0: return &v.state case 1: @@ -2645,7 +2796,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveInvitesRequest); i { + switch v := v.(*SaveV1ConversationsRequest); i { case 0: return &v.state case 1: @@ -2657,7 +2808,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveInvitesResponse); i { + switch v := v.(*SaveV1ConversationsResponse); i { case 0: return &v.state case 1: @@ -2669,7 +2820,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateAuthTokenRequest); i { + switch v := v.(*GetConversationsResponse); i { case 0: return &v.state case 1: @@ -2681,7 +2832,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetV2ConversationsResponse); i { + switch v := v.(*GetKeystoreStatusRequest); i { case 0: return &v.state case 1: @@ -2693,7 +2844,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKeystoreStatusRequest); i { + switch v := v.(*GetKeystoreStatusResponse); i { case 0: return &v.state case 1: @@ -2705,7 +2856,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKeystoreStatusResponse); i { + switch v := v.(*InitKeystoreRequest); i { case 0: return &v.state case 1: @@ -2717,7 +2868,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InitKeystoreRequest); i { + switch v := v.(*InitKeystoreResponse); i { case 0: return &v.state case 1: @@ -2729,7 +2880,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InitKeystoreResponse); i { + switch v := v.(*SignDigestRequest); i { case 0: return &v.state case 1: @@ -2741,7 +2892,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignDigestRequest); i { + switch v := v.(*GetRefreshJobRequest); i { case 0: return &v.state case 1: @@ -2753,7 +2904,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TopicMap); i { + switch v := v.(*GetRefreshJobResponse); i { case 0: return &v.state case 1: @@ -2765,7 +2916,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DecryptV1Request_Request); i { + switch v := v.(*SetRefeshJobRequest); i { case 0: return &v.state case 1: @@ -2777,7 +2928,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DecryptResponse_Response); i { + switch v := v.(*SetRefreshJobResponse); i { case 0: return &v.state case 1: @@ -2789,7 +2940,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DecryptResponse_Response_Success); i { + switch v := v.(*TopicMap); i { case 0: return &v.state case 1: @@ -2801,7 +2952,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DecryptV2Request_Request); i { + switch v := v.(*DecryptV1Request_Request); i { case 0: return &v.state case 1: @@ -2813,7 +2964,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EncryptV1Request_Request); i { + switch v := v.(*DecryptResponse_Response); i { case 0: return &v.state case 1: @@ -2825,7 +2976,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EncryptResponse_Response); i { + switch v := v.(*DecryptResponse_Response_Success); i { case 0: return &v.state case 1: @@ -2837,7 +2988,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EncryptResponse_Response_Success); i { + switch v := v.(*DecryptV2Request_Request); i { case 0: return &v.state case 1: @@ -2849,7 +3000,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EncryptV2Request_Request); i { + switch v := v.(*EncryptV1Request_Request); i { case 0: return &v.state case 1: @@ -2861,7 +3012,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveInvitesRequest_Request); i { + switch v := v.(*EncryptResponse_Response); i { case 0: return &v.state case 1: @@ -2873,7 +3024,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveInvitesResponse_Response); i { + switch v := v.(*EncryptResponse_Response_Success); i { case 0: return &v.state case 1: @@ -2885,7 +3036,7 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveInvitesResponse_Response_Success); i { + switch v := v.(*EncryptV2Request_Request); i { case 0: return &v.state case 1: @@ -2897,6 +3048,42 @@ func file_keystore_api_v1_keystore_proto_init() { } } file_keystore_api_v1_keystore_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveInvitesRequest_Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_keystore_api_v1_keystore_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveInvitesResponse_Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_keystore_api_v1_keystore_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveInvitesResponse_Response_Success); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_keystore_api_v1_keystore_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TopicMap_TopicData); i { case 0: return &v.state @@ -2909,23 +3096,23 @@ func file_keystore_api_v1_keystore_proto_init() { } } } - file_keystore_api_v1_keystore_proto_msgTypes[14].OneofWrappers = []interface{}{} - file_keystore_api_v1_keystore_proto_msgTypes[18].OneofWrappers = []interface{}{ + file_keystore_api_v1_keystore_proto_msgTypes[11].OneofWrappers = []interface{}{} + file_keystore_api_v1_keystore_proto_msgTypes[17].OneofWrappers = []interface{}{ (*InitKeystoreRequest_V1)(nil), } - file_keystore_api_v1_keystore_proto_msgTypes[20].OneofWrappers = []interface{}{ + file_keystore_api_v1_keystore_proto_msgTypes[19].OneofWrappers = []interface{}{ (*SignDigestRequest_IdentityKey)(nil), (*SignDigestRequest_PrekeyIndex)(nil), } - file_keystore_api_v1_keystore_proto_msgTypes[23].OneofWrappers = []interface{}{ + file_keystore_api_v1_keystore_proto_msgTypes[26].OneofWrappers = []interface{}{ (*DecryptResponse_Response_Result)(nil), (*DecryptResponse_Response_Error)(nil), } - file_keystore_api_v1_keystore_proto_msgTypes[27].OneofWrappers = []interface{}{ + file_keystore_api_v1_keystore_proto_msgTypes[30].OneofWrappers = []interface{}{ (*EncryptResponse_Response_Result)(nil), (*EncryptResponse_Response_Error)(nil), } - file_keystore_api_v1_keystore_proto_msgTypes[31].OneofWrappers = []interface{}{ + file_keystore_api_v1_keystore_proto_msgTypes[34].OneofWrappers = []interface{}{ (*SaveInvitesResponse_Response_Result)(nil), (*SaveInvitesResponse_Response_Error)(nil), } @@ -2934,8 +3121,8 @@ func file_keystore_api_v1_keystore_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_keystore_api_v1_keystore_proto_rawDesc, - NumEnums: 2, - NumMessages: 35, + NumEnums: 3, + NumMessages: 38, NumExtensions: 0, NumServices: 0, }, diff --git a/go/message_api/v1/message_api.pb.go b/go/message_api/v1/message_api.pb.go index dd46ff38..1222af5e 100644 --- a/go/message_api/v1/message_api.pb.go +++ b/go/message_api/v1/message_api.pb.go @@ -143,7 +143,6 @@ type Cursor struct { // This way we can handle both methods // // Types that are assignable to Cursor: - // // *Cursor_Index Cursor isCursor_Cursor `protobuf_oneof:"cursor"` } diff --git a/go/message_contents/ciphertext.pb.go b/go/message_contents/ciphertext.pb.go index d0a56673..9ceed39a 100644 --- a/go/message_contents/ciphertext.pb.go +++ b/go/message_contents/ciphertext.pb.go @@ -32,7 +32,6 @@ type Ciphertext struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Union: - // // *Ciphertext_Aes256GcmHkdfSha256 Union isCiphertext_Union `protobuf_oneof:"union"` } diff --git a/go/message_contents/composite.pb.go b/go/message_contents/composite.pb.go index 9c52b88a..28016550 100644 --- a/go/message_contents/composite.pb.go +++ b/go/message_contents/composite.pb.go @@ -77,7 +77,6 @@ type Composite_Part struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Element: - // // *Composite_Part_Part // *Composite_Part_Composite Element isComposite_Part_Element `protobuf_oneof:"element"` diff --git a/go/message_contents/contact.pb.go b/go/message_contents/contact.pb.go index 7b9df860..d29c7f7c 100644 --- a/go/message_contents/contact.pb.go +++ b/go/message_contents/contact.pb.go @@ -130,7 +130,6 @@ type ContactBundle struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Version: - // // *ContactBundle_V1 // *ContactBundle_V2 Version isContactBundle_Version `protobuf_oneof:"version"` diff --git a/go/message_contents/invitation.pb.go b/go/message_contents/invitation.pb.go index aea64918..206a2c6c 100644 --- a/go/message_contents/invitation.pb.go +++ b/go/message_contents/invitation.pb.go @@ -39,7 +39,6 @@ type InvitationV1 struct { // message encryption scheme and keys for this conversation. // // Types that are assignable to Encryption: - // // *InvitationV1_Aes256GcmHkdfSha256 Encryption isInvitationV1_Encryption `protobuf_oneof:"encryption"` } @@ -250,7 +249,6 @@ type SealedInvitation struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Version: - // // *SealedInvitation_V1 Version isSealedInvitation_Version `protobuf_oneof:"version"` } diff --git a/go/message_contents/message.pb.go b/go/message_contents/message.pb.go index 5e213a37..8bb8a649 100644 --- a/go/message_contents/message.pb.go +++ b/go/message_contents/message.pb.go @@ -269,7 +269,6 @@ type Message struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Version: - // // *Message_V1 // *Message_V2 Version isMessage_Version `protobuf_oneof:"version"` diff --git a/go/message_contents/private_key.pb.go b/go/message_contents/private_key.pb.go index e1066b6b..97356241 100644 --- a/go/message_contents/private_key.pb.go +++ b/go/message_contents/private_key.pb.go @@ -36,7 +36,6 @@ type SignedPrivateKey struct { // private key // // Types that are assignable to Union: - // // *SignedPrivateKey_Secp256K1_ Union isSignedPrivateKey_Union `protobuf_oneof:"union"` // public key for this private key @@ -182,7 +181,6 @@ type PrivateKey struct { // private key // // Types that are assignable to Union: - // // *PrivateKey_Secp256K1_ Union isPrivateKey_Union `protobuf_oneof:"union"` // public key for this private key @@ -323,7 +321,6 @@ type PrivateKeyBundle struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Version: - // // *PrivateKeyBundle_V1 // *PrivateKeyBundle_V2 Version isPrivateKeyBundle_Version `protobuf_oneof:"version"` @@ -467,7 +464,6 @@ type EncryptedPrivateKeyBundle struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Version: - // // *EncryptedPrivateKeyBundle_V1 Version isEncryptedPrivateKeyBundle_Version `protobuf_oneof:"version"` } diff --git a/go/message_contents/public_key.pb.go b/go/message_contents/public_key.pb.go index 4144db6f..98e03dbb 100644 --- a/go/message_contents/public_key.pb.go +++ b/go/message_contents/public_key.pb.go @@ -32,7 +32,6 @@ type UnsignedPublicKey struct { CreatedNs uint64 `protobuf:"varint,1,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` // Types that are assignable to Union: - // // *UnsignedPublicKey_Secp256K1Uncompressed_ Union isUnsignedPublicKey_Union `protobuf_oneof:"union"` } @@ -224,7 +223,6 @@ type PublicKey struct { Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3,oneof" json:"signature,omitempty"` // Types that are assignable to Union: - // // *PublicKey_Secp256K1Uncompressed_ Union isPublicKey_Union `protobuf_oneof:"union"` } diff --git a/go/message_contents/signature.pb.go b/go/message_contents/signature.pb.go index 8efe6cb5..b0980ad6 100644 --- a/go/message_contents/signature.pb.go +++ b/go/message_contents/signature.pb.go @@ -30,7 +30,6 @@ type Signature struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Union: - // // *Signature_EcdsaCompact // *Signature_WalletEcdsaCompact Union isSignature_Union `protobuf_oneof:"union"` From 00b705ae95db6d09bb16ad64b6b49eaab29510d5 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Fri, 8 Sep 2023 11:41:48 -0700 Subject: [PATCH 3/4] build: format protos consistently --- .protolint.yaml | 2 +- .vscode/extensions.json | 3 + .vscode/settings.json | 16 +- proto/keystore_api/v1/keystore.proto | 234 +++++++++--------- proto/message_api/v1/authn.proto | 20 +- proto/message_api/v1/message_api.proto | 157 ++++++------ proto/message_contents/ciphertext.proto | 52 ++-- proto/message_contents/composite.proto | 14 +- proto/message_contents/contact.proto | 12 +- proto/message_contents/content.proto | 52 ++-- .../conversation_reference.proto | 8 +- proto/message_contents/invitation.proto | 70 +++--- proto/message_contents/message.proto | 52 ++-- proto/message_contents/private_key.proto | 88 +++---- proto/message_contents/public_key.proto | 62 ++--- proto/message_contents/signature.proto | 34 +-- 16 files changed, 440 insertions(+), 436 deletions(-) create mode 100644 .vscode/extensions.json diff --git a/.protolint.yaml b/.protolint.yaml index 782a29e2..757fac79 100644 --- a/.protolint.yaml +++ b/.protolint.yaml @@ -56,7 +56,7 @@ lint: # INDENT rule option. indent: # Available styles are 4(4-spaces), 2(2-spaces) or tab. - style: 4 + style: 2 # Specifies if it should stop considering and inserting new lines at the appropriate positions # when the inner elements are on the same line. Default is false. not_insert_newline: true diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..6d5a557c --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["bufbuild.vscode-buf", "peterj.proto"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 557218a6..f16f4ab4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,10 @@ { - "protoc": { - "compile_on_save": false, - "options": [ - "--proto_path=build/tmp/vendor", - ] - } -} \ No newline at end of file + "protoc": { + "compile_on_save": false, + "options": ["--proto_path=build/tmp/vendor"] + }, + "[proto3]": { + "editor.defaultFormatter": "bufbuild.vscode-buf", + "editor.formatOnSave": true + } +} diff --git a/proto/keystore_api/v1/keystore.proto b/proto/keystore_api/v1/keystore.proto index 5d7064c5..814b7278 100644 --- a/proto/keystore_api/v1/keystore.proto +++ b/proto/keystore_api/v1/keystore.proto @@ -14,154 +14,154 @@ option java_package = "org.xmtp.proto.keystore.api.v1"; // Application-specific error codes for the Keystore API. enum ErrorCode { - ERROR_CODE_UNSPECIFIED = 0; - ERROR_CODE_INVALID_INPUT = 1; - ERROR_CODE_NO_MATCHING_PREKEY = 2; + ERROR_CODE_UNSPECIFIED = 0; + ERROR_CODE_INVALID_INPUT = 1; + ERROR_CODE_NO_MATCHING_PREKEY = 2; } // Wrapper class for errors from the Keystore API message KeystoreError { - string message = 1; - ErrorCode code = 2; + string message = 1; + ErrorCode code = 2; } // Decrypt a batch of messages using X3DH key agreement message DecryptV1Request { - // A single decryption request - message Request { - xmtp.message_contents.Ciphertext payload = 1; - xmtp.message_contents.PublicKeyBundle peer_keys = 2; - bytes header_bytes = 3; - bool is_sender = 4; - } + // A single decryption request + message Request { + xmtp.message_contents.Ciphertext payload = 1; + xmtp.message_contents.PublicKeyBundle peer_keys = 2; + bytes header_bytes = 3; + bool is_sender = 4; + } - repeated Request requests = 1; + repeated Request requests = 1; } // Response type for both V1 and V2 decryption requests message DecryptResponse { - // A single decryption response - message Response { - // Wrapper object for success response - message Success { - bytes decrypted = 1; - } - - oneof response { - Success result = 1; - KeystoreError error = 2; - } + // A single decryption response + message Response { + // Wrapper object for success response + message Success { + bytes decrypted = 1; + } + + oneof response { + Success result = 1; + KeystoreError error = 2; } + } - repeated Response responses = 1; + repeated Response responses = 1; } // Decrypt a batch of messages using the appropriate topic keys message DecryptV2Request { - // A single decryption request - message Request { - xmtp.message_contents.Ciphertext payload = 1; - bytes header_bytes = 2; - string content_topic = 3; - } + // A single decryption request + message Request { + xmtp.message_contents.Ciphertext payload = 1; + bytes header_bytes = 2; + string content_topic = 3; + } - repeated Request requests = 1; + repeated Request requests = 1; } // Encrypt a batch of messages using X3DH key agreement message EncryptV1Request { - // A single encryption request - message Request { - xmtp.message_contents.PublicKeyBundle recipient = 1; - bytes payload = 2; - bytes header_bytes = 3; - } + // A single encryption request + message Request { + xmtp.message_contents.PublicKeyBundle recipient = 1; + bytes payload = 2; + bytes header_bytes = 3; + } - repeated Request requests = 1; + repeated Request requests = 1; } // Response type for both V1 and V2 encryption requests message EncryptResponse { - // A single encryption response - message Response { - // Wrapper object for success response - message Success { - xmtp.message_contents.Ciphertext encrypted = 1; - } - - oneof response { - Success result = 1; - KeystoreError error = 2; - } + // A single encryption response + message Response { + // Wrapper object for success response + message Success { + xmtp.message_contents.Ciphertext encrypted = 1; + } + + oneof response { + Success result = 1; + KeystoreError error = 2; } + } - repeated Response responses = 1; + repeated Response responses = 1; } // Encrypt a batch of messages using the appropriate topic keys message EncryptV2Request { - // A single encryption request - message Request { - bytes payload = 1; - bytes header_bytes = 2; - string content_topic = 3; - } + // A single encryption request + message Request { + bytes payload = 1; + bytes header_bytes = 2; + string content_topic = 3; + } - repeated Request requests = 1; + repeated Request requests = 1; } // Request to create an invite payload, and store the topic keys in the Keystore message CreateInviteRequest { - xmtp.message_contents.InvitationV1.Context context = 1; - xmtp.message_contents.SignedPublicKeyBundle recipient = 2; - uint64 created_ns = 3; + xmtp.message_contents.InvitationV1.Context context = 1; + xmtp.message_contents.SignedPublicKeyBundle recipient = 2; + uint64 created_ns = 3; } // Response to a CreateInviteRequest message CreateInviteResponse { - xmtp.message_contents.ConversationReference conversation = 1; - bytes payload = 2; + xmtp.message_contents.ConversationReference conversation = 1; + bytes payload = 2; } // Request to save a batch of invite messages to the Keystore message SaveInvitesRequest { - // Mirrors xmtp.envelope schema - message Request { - string content_topic = 1; - uint64 timestamp_ns = 2; - bytes payload = 3; - } + // Mirrors xmtp.envelope schema + message Request { + string content_topic = 1; + uint64 timestamp_ns = 2; + bytes payload = 3; + } - repeated Request requests = 1; + repeated Request requests = 1; } // Response to a SaveInvitesRequest message SaveInvitesResponse { - // A single response - message Response { - // Wrapper object for success response - message Success { - xmtp.message_contents.ConversationReference conversation = 1; - } - - oneof response { - Success result = 1; - KeystoreError error = 2; - } + // A single response + message Response { + // Wrapper object for success response + message Success { + xmtp.message_contents.ConversationReference conversation = 1; } - repeated Response responses = 1; + oneof response { + Success result = 1; + KeystoreError error = 2; + } + } + + repeated Response responses = 1; } // CreateAuthTokenRequest is used to create an auth token for the XMTP API message CreateAuthTokenRequest { - optional uint64 timestamp_ns = 1; + optional uint64 timestamp_ns = 1; } // SaveV1ConversationsRequest is used to save a batch of conversations to the // built in persistence message SaveV1ConversationsRequest { - repeated xmtp.message_contents.ConversationReference conversations = 1; + repeated xmtp.message_contents.ConversationReference conversations = 1; } // Placeholder response type for SaveV1Conversations @@ -169,71 +169,71 @@ message SaveV1ConversationsResponse {} // Response for GetV2Conversations message GetConversationsResponse { - repeated xmtp.message_contents.ConversationReference conversations = 1; + repeated xmtp.message_contents.ConversationReference conversations = 1; } // Used to check if the Keystore implementation has been setup for the given // wallet address Only used for MM Snap Keystore currently message GetKeystoreStatusRequest { - string wallet_address = 1; + string wallet_address = 1; } // Response to GetKeystoreStatusRequest message GetKeystoreStatusResponse { - // Status of the Keystore for the specified wallet address - enum KeystoreStatus { - KEYSTORE_STATUS_UNSPECIFIED = 0; - KEYSTORE_STATUS_UNINITIALIZED = 1; - KEYSTORE_STATUS_INITIALIZED = 2; - } + // Status of the Keystore for the specified wallet address + enum KeystoreStatus { + KEYSTORE_STATUS_UNSPECIFIED = 0; + KEYSTORE_STATUS_UNINITIALIZED = 1; + KEYSTORE_STATUS_INITIALIZED = 2; + } - KeystoreStatus status = 1; + KeystoreStatus status = 1; } // Used to initialize the Keystore with a private key bundle retrieved from the // client message InitKeystoreRequest { - oneof bundle { - xmtp.message_contents.PrivateKeyBundleV1 v1 = 1; - } + oneof bundle { + xmtp.message_contents.PrivateKeyBundleV1 v1 = 1; + } } // Response to the request to initialize the Keystore message InitKeystoreResponse { - KeystoreError error = 1; + KeystoreError error = 1; } // SignDigestRequest is used to sign a digest with either the identity key // or a prekey message SignDigestRequest { - bytes digest = 1; - oneof signer { - bool identity_key = 2; - uint32 prekey_index = 3; - } + bytes digest = 1; + oneof signer { + bool identity_key = 2; + uint32 prekey_index = 3; + } } // JobType is used to specify the type of job the caller would like info on enum JobType { - JOB_TYPE_UNSPECIFIED = 0; - JOB_TYPE_REFRESH_V1 = 1; - JOB_TYPE_REFRESH_V2 = 2; + JOB_TYPE_UNSPECIFIED = 0; + JOB_TYPE_REFRESH_V1 = 1; + JOB_TYPE_REFRESH_V2 = 2; } // GetRefreshJobRequest is used to get the last run time of a refresh job message GetRefreshJobRequest { - JobType job_type = 1; + JobType job_type = 1; } // GetRefreshJobResponse is used to return the last run time of a refresh job message GetRefreshJobResponse { - int64 last_run_ns = 1; + int64 last_run_ns = 1; } // SetRefreshJobRequest is used to set the last run time of a refresh job message SetRefeshJobRequest { - JobType job_type = 1; - int64 last_run_ns = 2; + JobType job_type = 1; + int64 last_run_ns = 2; } // SetRefreshJobResponse is an empty response type @@ -241,11 +241,11 @@ message SetRefreshJobResponse {} // A mapping of topics to their decrypted invitations message TopicMap { - // TopicData wraps the invitation and the timestamp it was created - message TopicData { - uint64 created_ns = 1; - string peer_address = 2; - xmtp.message_contents.InvitationV1 invitation = 3; - } - map topics = 1; -} \ No newline at end of file + // TopicData wraps the invitation and the timestamp it was created + message TopicData { + uint64 created_ns = 1; + string peer_address = 2; + xmtp.message_contents.InvitationV1 invitation = 3; + } + map topics = 1; +} diff --git a/proto/message_api/v1/authn.proto b/proto/message_api/v1/authn.proto index 38a37008..724e1df8 100644 --- a/proto/message_api/v1/authn.proto +++ b/proto/message_api/v1/authn.proto @@ -11,12 +11,12 @@ option java_package = "org.xmtp.proto.message.api.v1"; // Token is used by clients to prove to the nodes // that they are serving a specific wallet. message Token { - // identity key signed by a wallet - xmtp.message_contents.PublicKey identity_key = 1; - // encoded bytes of AuthData - bytes auth_data_bytes = 2; - // identity key signature of AuthData bytes - xmtp.message_contents.Signature auth_data_signature = 3; + // identity key signed by a wallet + xmtp.message_contents.PublicKey identity_key = 1; + // encoded bytes of AuthData + bytes auth_data_bytes = 2; + // identity key signature of AuthData bytes + xmtp.message_contents.Signature auth_data_signature = 3; } // AuthData carries token parameters that are authenticated @@ -25,8 +25,8 @@ message Token { // so that the bytes don't need to be reconstructed // to verify the token signature. message AuthData { - // address of the wallet - string wallet_addr = 1; - // time when the token was generated/signed - uint64 created_ns = 2; + // address of the wallet + string wallet_addr = 1; + // time when the token was generated/signed + uint64 created_ns = 2; } diff --git a/proto/message_api/v1/message_api.proto b/proto/message_api/v1/message_api.proto index d571d5fe..bf8cf083 100644 --- a/proto/message_api/v1/message_api.proto +++ b/proto/message_api/v1/message_api.proto @@ -8,106 +8,105 @@ import "protoc-gen-openapiv2/options/annotations.proto"; option go_package = "github.com/xmtp/proto/v3/go/message_api/v1"; option java_package = "org.xmtp.proto.message.api.v1"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info: { title: "MessageApi"; -version: "1.0"; -} -; -} -; + info: { + title: "MessageApi"; + version: "1.0"; + }; +}; // RPC service MessageApi { - // Publish messages to the network - rpc Publish(PublishRequest) returns (PublishResponse) { - option (google.api.http) = { - post: "/message/v1/publish" - body: "*" - }; - } - // Subscribe to a stream of new envelopes matching a predicate - rpc Subscribe(SubscribeRequest) returns (stream Envelope) { - option (google.api.http) = { - post: "/message/v1/subscribe" - body: "*" - }; - } - // Subscribe to a stream of new envelopes and your subscription using - // bidirectional streaming - // protolint:disable:next RPC_REQUEST_STANDARD_NAME - rpc Subscribe2(stream SubscribeRequest) returns (stream Envelope) {} - // Subscribe to a stream of all messages - rpc SubscribeAll(SubscribeAllRequest) returns (stream Envelope) { - option (google.api.http) = { - post: "/message/v1/subscribe-all" - body: "*" - }; - } - // Query the store for messages - rpc Query(QueryRequest) returns (QueryResponse) { - option (google.api.http) = { - post: "/message/v1/query" - body: "*" - }; - } - // BatchQuery containing a set of queries to be processed - rpc BatchQuery(BatchQueryRequest) returns (BatchQueryResponse) { - option (google.api.http) = { - post: "/message/v1/batch-query" - body: "*" - }; - } + // Publish messages to the network + rpc Publish(PublishRequest) returns (PublishResponse) { + option (google.api.http) = { + post: "/message/v1/publish" + body: "*" + }; + } + // Subscribe to a stream of new envelopes matching a predicate + rpc Subscribe(SubscribeRequest) returns (stream Envelope) { + option (google.api.http) = { + post: "/message/v1/subscribe" + body: "*" + }; + } + // Subscribe to a stream of new envelopes and your subscription using + // bidirectional streaming + // protolint:disable:next RPC_REQUEST_STANDARD_NAME + rpc Subscribe2(stream SubscribeRequest) returns (stream Envelope) {} + // Subscribe to a stream of all messages + rpc SubscribeAll(SubscribeAllRequest) returns (stream Envelope) { + option (google.api.http) = { + post: "/message/v1/subscribe-all" + body: "*" + }; + } + // Query the store for messages + rpc Query(QueryRequest) returns (QueryResponse) { + option (google.api.http) = { + post: "/message/v1/query" + body: "*" + }; + } + // BatchQuery containing a set of queries to be processed + rpc BatchQuery(BatchQueryRequest) returns (BatchQueryResponse) { + option (google.api.http) = { + post: "/message/v1/batch-query" + body: "*" + }; + } } // Sort direction enum SortDirection { - SORT_DIRECTION_UNSPECIFIED = 0; - SORT_DIRECTION_ASCENDING = 1; - SORT_DIRECTION_DESCENDING = 2; + SORT_DIRECTION_UNSPECIFIED = 0; + SORT_DIRECTION_ASCENDING = 1; + SORT_DIRECTION_DESCENDING = 2; } // This is based off of the go-waku Index type, but with the // receiverTime and pubsubTopic removed for simplicity. // Both removed fields are optional message IndexCursor { - bytes digest = 1; - uint64 sender_time_ns = 2; + bytes digest = 1; + uint64 sender_time_ns = 2; } // Wrapper for potentially multiple types of cursor message Cursor { - // Making the cursor a one-of type, as I would like to change the way we - // handle pagination to use a precomputed sort field. - // This way we can handle both methods - oneof cursor { - IndexCursor index = 1; - } + // Making the cursor a one-of type, as I would like to change the way we + // handle pagination to use a precomputed sort field. + // This way we can handle both methods + oneof cursor { + IndexCursor index = 1; + } } // This is based off of the go-waku PagingInfo struct, but with the direction // changed to our SortDirection enum format message PagingInfo { - // Note: this is a uint32, while go-waku's pageSize is a uint64 - uint32 limit = 1; - Cursor cursor = 2; - SortDirection direction = 3; + // Note: this is a uint32, while go-waku's pageSize is a uint64 + uint32 limit = 1; + Cursor cursor = 2; + SortDirection direction = 3; } // Envelope encapsulates a message while in transit. message Envelope { - // The topic the message belongs to, - // If the message includes the topic as well - // it MUST be the same as the topic in the envelope. - string content_topic = 1; - // Message creation timestamp - // If the message includes the timestamp as well - // it MUST be equivalent to the timestamp in the envelope. - uint64 timestamp_ns = 2; - bytes message = 3; + // The topic the message belongs to, + // If the message includes the topic as well + // it MUST be the same as the topic in the envelope. + string content_topic = 1; + // Message creation timestamp + // If the message includes the timestamp as well + // it MUST be equivalent to the timestamp in the envelope. + uint64 timestamp_ns = 2; + bytes message = 3; } // Publish message PublishRequest { - repeated Envelope envelopes = 1; + repeated Envelope envelopes = 1; } // Empty message as a response for Publish @@ -115,7 +114,7 @@ message PublishResponse {} // Subscribe message SubscribeRequest { - repeated string content_topics = 1; + repeated string content_topics = 1; } // SubscribeAll @@ -123,24 +122,24 @@ message SubscribeAllRequest {} // Query message QueryRequest { - repeated string content_topics = 1; - uint64 start_time_ns = 2; - uint64 end_time_ns = 3; - PagingInfo paging_info = 4; + repeated string content_topics = 1; + uint64 start_time_ns = 2; + uint64 end_time_ns = 3; + PagingInfo paging_info = 4; } // The response, containing envelopes, for a query message QueryResponse { - repeated Envelope envelopes = 1; - PagingInfo paging_info = 2; + repeated Envelope envelopes = 1; + PagingInfo paging_info = 2; } // BatchQuery message BatchQueryRequest { - repeated QueryRequest requests = 1; + repeated QueryRequest requests = 1; } // Response containing a list of QueryResponse messages message BatchQueryResponse { - repeated QueryResponse responses = 1; + repeated QueryResponse responses = 1; } diff --git a/proto/message_contents/ciphertext.proto b/proto/message_contents/ciphertext.proto index fc63a32a..98cb59c5 100644 --- a/proto/message_contents/ciphertext.proto +++ b/proto/message_contents/ciphertext.proto @@ -13,33 +13,33 @@ option java_package = "org.xmtp.proto.message.contents"; // The payload is accompanied by the cryptographic parameters // required by the chosen encryption scheme. message Ciphertext { - oneof union { - Aes256gcmHkdfsha256 aes256_gcm_hkdf_sha256 = 1; - } - - // Supported Encryption Schemes - - // Encryption: AES256-GCM - // Key derivation function: HKDF-SHA256 - message Aes256gcmHkdfsha256 { - bytes hkdf_salt = 1; // 32 bytes - bytes gcm_nonce = 2; // 12 bytes - bytes payload = 3; // encrypted payload - } + oneof union { + Aes256gcmHkdfsha256 aes256_gcm_hkdf_sha256 = 1; + } + + // Supported Encryption Schemes + + // Encryption: AES256-GCM + // Key derivation function: HKDF-SHA256 + message Aes256gcmHkdfsha256 { + bytes hkdf_salt = 1; // 32 bytes + bytes gcm_nonce = 2; // 12 bytes + bytes payload = 3; // encrypted payload + } } // SignedEciesCiphertext represents an ECIES encrypted payload and a signature message SignedEciesCiphertext { - // Ecies is ciphertext encrypted using ECIES with a MAC - message Ecies { - bytes ephemeral_public_key = 1; // 65 bytes - bytes iv = 2; // 16 bytes - bytes mac = 3; // 32 bytes - bytes ciphertext = 4; // encrypted payload with block size of 16 - } - - // serialized Ecies message - bytes ecies_bytes = 1; - // signature of sha256(ecies_bytes) signed with the IdentityKey - xmtp.message_contents.Signature signature = 2; -} \ No newline at end of file + // Ecies is ciphertext encrypted using ECIES with a MAC + message Ecies { + bytes ephemeral_public_key = 1; // 65 bytes + bytes iv = 2; // 16 bytes + bytes mac = 3; // 32 bytes + bytes ciphertext = 4; // encrypted payload with block size of 16 + } + + // serialized Ecies message + bytes ecies_bytes = 1; + // signature of sha256(ecies_bytes) signed with the IdentityKey + xmtp.message_contents.Signature signature = 2; +} diff --git a/proto/message_contents/composite.proto b/proto/message_contents/composite.proto index 464f3a11..9a23239e 100644 --- a/proto/message_contents/composite.proto +++ b/proto/message_contents/composite.proto @@ -10,13 +10,13 @@ option java_package = "org.xmtp.proto.message.contents"; // Composite is used to implement xmtp.org/composite content type message Composite { - // Part represents one section of a composite message - message Part { - oneof element { - EncodedContent part = 1; - Composite composite = 2; - } + // Part represents one section of a composite message + message Part { + oneof element { + EncodedContent part = 1; + Composite composite = 2; } + } - repeated Part parts = 1; + repeated Part parts = 1; } diff --git a/proto/message_contents/contact.proto b/proto/message_contents/contact.proto index 3f31a02a..3a3ed627 100644 --- a/proto/message_contents/contact.proto +++ b/proto/message_contents/contact.proto @@ -15,18 +15,18 @@ option java_package = "org.xmtp.proto.message.contents"; // LEGACY: User key bundle V1 using PublicKeys. // The PublicKeys MUST be signed. message ContactBundleV1 { - PublicKeyBundle key_bundle = 1; + PublicKeyBundle key_bundle = 1; } // User key bundle V2 using SignedPublicKeys. message ContactBundleV2 { - SignedPublicKeyBundle key_bundle = 1; + SignedPublicKeyBundle key_bundle = 1; } // Versioned ContactBundle message ContactBundle { - oneof version { - ContactBundleV1 v1 = 1; - ContactBundleV2 v2 = 2; - } + oneof version { + ContactBundleV1 v1 = 1; + ContactBundleV2 v2 = 2; + } } diff --git a/proto/message_contents/content.proto b/proto/message_contents/content.proto index 14c1de64..29251e0e 100644 --- a/proto/message_contents/content.proto +++ b/proto/message_contents/content.proto @@ -11,45 +11,45 @@ option java_package = "org.xmtp.proto.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 - uint32 version_major = 3; // major version of the type - uint32 version_minor = 4; // minor version of the type + 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 } // Recognized compression algorithms // protolint:disable ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH enum Compression { - COMPRESSION_DEFLATE = 0; - COMPRESSION_GZIP = 1; + COMPRESSION_DEFLATE = 0; + COMPRESSION_GZIP = 1; } // protolint:enable ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH // EncodedContent bundles the content with metadata identifying its type // and parameters required for correct decoding and presentation of the content. message EncodedContent { - // content type identifier used to match the payload with - // the correct decoding machinery - ContentTypeId type = 1; - // optional encoding parameters required to correctly decode the content - map parameters = 2; - // optional fallback description of the content that can be used in case - // the client cannot decode or render the content - optional string fallback = 3; - // optional compression; the value indicates algorithm used to - // compress the encoded content bytes - optional Compression compression = 5; - // encoded content itself - bytes content = 4; + // content type identifier used to match the payload with + // the correct decoding machinery + ContentTypeId type = 1; + // optional encoding parameters required to correctly decode the content + map parameters = 2; + // optional fallback description of the content that can be used in case + // the client cannot decode or render the content + optional string fallback = 3; + // optional compression; the value indicates algorithm used to + // compress the encoded content bytes + optional Compression compression = 5; + // encoded content itself + bytes content = 4; } // SignedContent attaches a signature to EncodedContent. message SignedContent { - // MUST contain EncodedContent - bytes payload = 1; - SignedPublicKeyBundle sender = 2; - // MUST be a signature of a concatenation of - // the message header bytes and the payload bytes, - // signed by the sender's pre-key. - Signature signature = 3; + // MUST contain EncodedContent + bytes payload = 1; + SignedPublicKeyBundle sender = 2; + // MUST be a signature of a concatenation of + // the message header bytes and the payload bytes, + // signed by the sender's pre-key. + Signature signature = 3; } diff --git a/proto/message_contents/conversation_reference.proto b/proto/message_contents/conversation_reference.proto index 6ec83304..7beec75f 100644 --- a/proto/message_contents/conversation_reference.proto +++ b/proto/message_contents/conversation_reference.proto @@ -10,8 +10,8 @@ option java_package = "org.xmtp.proto.message.contents"; // A light pointer for a conversation that contains no decryption keys message ConversationReference { - string topic = 1; - string peer_address = 2; - uint64 created_ns = 3; - xmtp.message_contents.InvitationV1.Context context = 4; + string topic = 1; + string peer_address = 2; + uint64 created_ns = 3; + xmtp.message_contents.InvitationV1.Context context = 4; } diff --git a/proto/message_contents/invitation.proto b/proto/message_contents/invitation.proto index 8852e675..5d0337e9 100644 --- a/proto/message_contents/invitation.proto +++ b/proto/message_contents/invitation.proto @@ -13,33 +13,33 @@ option java_package = "org.xmtp.proto.message.contents"; // Unsealed invitation V1 message InvitationV1 { - // Supported encryption schemes - // AES256-GCM-HKDF-SHA256 - message Aes256gcmHkdfsha256 { - bytes key_material = 1; // randomly generated key material (32 bytes) - } + // Supported encryption schemes + // AES256-GCM-HKDF-SHA256 + message Aes256gcmHkdfsha256 { + bytes key_material = 1; // randomly generated key material (32 bytes) + } - // The context type - message Context { - // Expected to be a URI (ie xmtp.org/convo1) - string conversation_id = 1; - // Key value map of additional metadata that would be exposed to - // application developers and could be used for filtering - map metadata = 2; - } - // topic name chosen for this conversation. - // It MUST be randomly generated bytes (length >= 32), - // then base64 encoded without padding - string topic = 1; + // The context type + message Context { + // Expected to be a URI (ie xmtp.org/convo1) + string conversation_id = 1; + // Key value map of additional metadata that would be exposed to + // application developers and could be used for filtering + map metadata = 2; + } + // topic name chosen for this conversation. + // It MUST be randomly generated bytes (length >= 32), + // then base64 encoded without padding + string topic = 1; - // A context object defining metadata - Context context = 2; + // A context object defining metadata + Context context = 2; - // message encryption scheme and keys for this conversation. - oneof encryption { - // Specify the encryption method to process the key material properly. - Aes256gcmHkdfsha256 aes256_gcm_hkdf_sha256 = 3; - } + // message encryption scheme and keys for this conversation. + oneof encryption { + // Specify the encryption method to process the key material properly. + Aes256gcmHkdfsha256 aes256_gcm_hkdf_sha256 = 3; + } } // Sealed Invitation V1 Header @@ -47,9 +47,9 @@ message InvitationV1 { // it is however authenticated as associated data with the AEAD scheme used // to encrypt the invitation body, thus providing tamper evidence. message SealedInvitationHeaderV1 { - SignedPublicKeyBundle sender = 1; - SignedPublicKeyBundle recipient = 2; - uint64 created_ns = 3; + SignedPublicKeyBundle sender = 1; + SignedPublicKeyBundle recipient = 2; + uint64 created_ns = 3; } // Sealed Invitation V1 @@ -57,16 +57,16 @@ message SealedInvitationHeaderV1 { // recipient's public key bundles using simplified X3DH where // the sender's ephemeral key is replaced with sender's pre-key. message SealedInvitationV1 { - // encoded SealedInvitationHeaderV1 used as associated data for Ciphertext - bytes header_bytes = 1; - // Ciphertext.payload MUST contain encrypted InvitationV1. - Ciphertext ciphertext = 2; + // encoded SealedInvitationHeaderV1 used as associated data for Ciphertext + bytes header_bytes = 1; + // Ciphertext.payload MUST contain encrypted InvitationV1. + Ciphertext ciphertext = 2; } // Versioned Sealed Invitation message SealedInvitation { - reserved 2; - oneof version { - SealedInvitationV1 v1 = 1; - }; + reserved 2; + oneof version { + SealedInvitationV1 v1 = 1; + } } diff --git a/proto/message_contents/message.proto b/proto/message_contents/message.proto index bcd17c60..dbccbc06 100644 --- a/proto/message_contents/message.proto +++ b/proto/message_contents/message.proto @@ -15,16 +15,16 @@ option java_package = "org.xmtp.proto.message.contents"; // Message header is encoded separately as the bytes are also used // as associated data for authenticated encryption message MessageHeaderV1 { - PublicKeyBundle sender = 1; - PublicKeyBundle recipient = 2; - uint64 timestamp = 3; + PublicKeyBundle sender = 1; + PublicKeyBundle recipient = 2; + uint64 timestamp = 3; } // Message is the top level protocol element message MessageV1 { - bytes header_bytes = 1; // encapsulates encoded MessageHeaderV1 - // Ciphertext.payload MUST contain encrypted EncodedContent - Ciphertext ciphertext = 2; + bytes header_bytes = 1; // encapsulates encoded MessageHeaderV1 + // Ciphertext.payload MUST contain encrypted EncodedContent + Ciphertext ciphertext = 2; } // Message V2 @@ -34,37 +34,37 @@ message MessageV1 { // of the AEAD encryption used to protect the message, // thus providing tamper evidence. message MessageHeaderV2 { - // sender specified message creation time - uint64 created_ns = 1; - // the topic the message belongs to - string topic = 2; + // sender specified message creation time + uint64 created_ns = 1; + // the topic the message belongs to + string topic = 2; } // Message combines the encoded header with the encrypted payload. message MessageV2 { - bytes header_bytes = 1; // encapsulates encoded MessageHeaderV2 - // Ciphertext.payload MUST contain encrypted SignedContent - Ciphertext ciphertext = 2; + bytes header_bytes = 1; // encapsulates encoded MessageHeaderV2 + // Ciphertext.payload MUST contain encrypted SignedContent + Ciphertext ciphertext = 2; } // Versioned Message message Message { - oneof version { - MessageV1 v1 = 1; - MessageV2 v2 = 2; - } + oneof version { + MessageV1 v1 = 1; + MessageV2 v2 = 2; + } } // DecodedMessage represents the decrypted message contents. // DecodedMessage instances are not stored on the network, but // may be serialized and stored by clients message DecodedMessage { - string id = 1; - string message_version = 2; - string sender_address = 3; - optional string recipient_address = 4; - uint64 sent_ns = 5; - string content_topic = 6; - ConversationReference conversation = 7; - bytes content_bytes = 8; // encapsulates EncodedContent -} \ No newline at end of file + string id = 1; + string message_version = 2; + string sender_address = 3; + optional string recipient_address = 4; + uint64 sent_ns = 5; + string content_topic = 6; + ConversationReference conversation = 7; + bytes content_bytes = 8; // encapsulates EncodedContent +} diff --git a/proto/message_contents/private_key.proto b/proto/message_contents/private_key.proto index f509e69a..165a8858 100644 --- a/proto/message_contents/private_key.proto +++ b/proto/message_contents/private_key.proto @@ -14,64 +14,64 @@ option java_package = "org.xmtp.proto.message.contents"; // PrivateKey generalized to support different key types message SignedPrivateKey { - // time the key was created - uint64 created_ns = 1; - // private key - oneof union { - Secp256k1 secp256k1 = 2; - } - // public key for this private key - SignedPublicKey public_key = 3; + // time the key was created + uint64 created_ns = 1; + // private key + oneof union { + Secp256k1 secp256k1 = 2; + } + // public key for this private key + SignedPublicKey public_key = 3; - // Supported key types + // Supported key types - // EC: SECP256k1 - message Secp256k1 { - bytes bytes = 1; // D big-endian, 32 bytes - } + // EC: SECP256k1 + message Secp256k1 { + bytes bytes = 1; // D big-endian, 32 bytes + } } // PrivateKeyBundle wraps the identityKey and the preKeys, // enforces usage of signed keys. message PrivateKeyBundleV2 { - SignedPrivateKey identity_key = 1; - // all the known pre-keys, newer keys first, - repeated SignedPrivateKey pre_keys = 2; + SignedPrivateKey identity_key = 1; + // all the known pre-keys, newer keys first, + repeated SignedPrivateKey pre_keys = 2; } // LEGACY: PrivateKey generalized to support different key types message PrivateKey { - // time the key was created - uint64 timestamp = 1; - // private key - oneof union { - Secp256k1 secp256k1 = 2; - } - // public key for this private key - PublicKey public_key = 3; + // time the key was created + uint64 timestamp = 1; + // private key + oneof union { + Secp256k1 secp256k1 = 2; + } + // public key for this private key + PublicKey public_key = 3; - // Supported key types + // Supported key types - // EC: SECP256k1 - message Secp256k1 { - bytes bytes = 1; // D big-endian, 32 bytes - } + // EC: SECP256k1 + message Secp256k1 { + bytes bytes = 1; // D big-endian, 32 bytes + } } // LEGACY: PrivateKeyBundleV1 wraps the identityKey and the preKeys message PrivateKeyBundleV1 { - PrivateKey identity_key = 1; - // all the known pre-keys, newer keys first, - repeated PrivateKey pre_keys = 2; + PrivateKey identity_key = 1; + // all the known pre-keys, newer keys first, + repeated PrivateKey pre_keys = 2; } // Versioned PrivateKeyBundle message PrivateKeyBundle { - reserved 3; - oneof version { - PrivateKeyBundleV1 v1 = 1; - PrivateKeyBundleV2 v2 = 2; - } + reserved 3; + oneof version { + PrivateKeyBundleV1 v1 = 1; + PrivateKeyBundleV2 v2 = 2; + } } // PrivateKeyBundle encrypted with key material generated by @@ -80,15 +80,15 @@ message PrivateKeyBundle { // the pre-key embedded in it. // (see xmtp-js::PrivateKeyBundle.toEncryptedBytes for details) message EncryptedPrivateKeyBundleV1 { - // randomly generated pre-key - bytes wallet_pre_key = 1; // 32 bytes - // MUST contain encrypted PrivateKeyBundle - Ciphertext ciphertext = 2; + // randomly generated pre-key + bytes wallet_pre_key = 1; // 32 bytes + // MUST contain encrypted PrivateKeyBundle + Ciphertext ciphertext = 2; } // Versioned encrypted PrivateKeyBundle message EncryptedPrivateKeyBundle { - oneof version { - EncryptedPrivateKeyBundleV1 v1 = 1; - } + oneof version { + EncryptedPrivateKeyBundleV1 v1 = 1; + } } diff --git a/proto/message_contents/public_key.proto b/proto/message_contents/public_key.proto index db6c18de..64f41a9c 100644 --- a/proto/message_contents/public_key.proto +++ b/proto/message_contents/public_key.proto @@ -12,32 +12,32 @@ option java_package = "org.xmtp.proto.message.contents"; // UnsignedPublicKey represents a generalized public key, // defined as a union to support cryptographic algorithm agility. message UnsignedPublicKey { - uint64 created_ns = 1; - oneof union { - Secp256k1Uncompressed secp256k1_uncompressed = 3; - } + uint64 created_ns = 1; + oneof union { + Secp256k1Uncompressed secp256k1_uncompressed = 3; + } - // Supported key types + // Supported key types - // EC: SECP256k1 - message Secp256k1Uncompressed { - // uncompressed point with prefix (0x04) [ P || X || Y ], 65 bytes - bytes bytes = 1; - } + // EC: SECP256k1 + message Secp256k1Uncompressed { + // uncompressed point with prefix (0x04) [ P || X || Y ], 65 bytes + bytes bytes = 1; + } } -// SignedPublicKey +// SignedPublicKey message SignedPublicKey { - bytes key_bytes = 1; // embeds an UnsignedPublicKey - Signature signature = 2; // signs key_bytes + bytes key_bytes = 1; // embeds an UnsignedPublicKey + Signature signature = 2; // signs key_bytes } // PublicKeyBundle packages the cryptographic keys associated with a wallet. message SignedPublicKeyBundle { - // Identity key MUST be signed by the wallet. - SignedPublicKey identity_key = 1; - // Pre-key MUST be signed by the identity key. - SignedPublicKey pre_key = 2; + // Identity key MUST be signed by the wallet. + SignedPublicKey identity_key = 1; + // Pre-key MUST be signed by the identity key. + SignedPublicKey pre_key = 2; } // LEGACY @@ -45,23 +45,23 @@ message SignedPublicKeyBundle { // PublicKey represents a generalized public key, // defined as a union to support cryptographic algorithm agility. message PublicKey { - // The key bytes - message Secp256k1Uncompressed { - // uncompressed point with prefix (0x04) [ P || X || Y ], 65 bytes - bytes bytes = 1; - } - uint64 timestamp = 1; - optional Signature signature = 2; - oneof union { - Secp256k1Uncompressed secp256k1_uncompressed = 3; - } + // The key bytes + message Secp256k1Uncompressed { + // uncompressed point with prefix (0x04) [ P || X || Y ], 65 bytes + bytes bytes = 1; + } + uint64 timestamp = 1; + optional Signature signature = 2; + oneof union { + Secp256k1Uncompressed secp256k1_uncompressed = 3; + } } // PublicKeyBundle packages the cryptographic keys associated with a wallet, // both senders and recipients are identified by their key bundles. message PublicKeyBundle { - // Identity key MUST be signed by the wallet. - PublicKey identity_key = 1; - // Pre-key MUST be signed by the identity key. - PublicKey pre_key = 2; + // Identity key MUST be signed by the wallet. + PublicKey identity_key = 1; + // Pre-key MUST be signed by the identity key. + PublicKey pre_key = 2; } diff --git a/proto/message_contents/signature.proto b/proto/message_contents/signature.proto index d470c29f..dc85614c 100644 --- a/proto/message_contents/signature.proto +++ b/proto/message_contents/signature.proto @@ -9,21 +9,21 @@ option java_package = "org.xmtp.proto.message.contents"; // Signature represents a generalized public key signature, // defined as a union to support cryptographic algorithm agility. message Signature { - // ECDSA signature bytes and the recovery bit - message ECDSACompact { - bytes bytes = 1; // compact representation [ R || S ], 64 bytes - uint32 recovery = 2; // recovery bit - } - // ECDSA signature bytes and the recovery bit - // produced by xmtp-js::PublicKey.signWithWallet function, i.e. - // EIP-191 signature of a "Create Identity" message with the key embedded. - // Used to sign identity keys. - message WalletECDSACompact { - bytes bytes = 1; // compact representation [ R || S ], 64 bytes - uint32 recovery = 2; // recovery bit - } - oneof union { - ECDSACompact ecdsa_compact = 1; - WalletECDSACompact wallet_ecdsa_compact = 2; - } + // ECDSA signature bytes and the recovery bit + message ECDSACompact { + bytes bytes = 1; // compact representation [ R || S ], 64 bytes + uint32 recovery = 2; // recovery bit + } + // ECDSA signature bytes and the recovery bit + // produced by xmtp-js::PublicKey.signWithWallet function, i.e. + // EIP-191 signature of a "Create Identity" message with the key embedded. + // Used to sign identity keys. + message WalletECDSACompact { + bytes bytes = 1; // compact representation [ R || S ], 64 bytes + uint32 recovery = 2; // recovery bit + } + oneof union { + ECDSACompact ecdsa_compact = 1; + WalletECDSACompact wallet_ecdsa_compact = 2; + } } From 120213985afa2d4efb8e94d63a481de2c15be280 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Fri, 13 Oct 2023 12:13:28 -0700 Subject: [PATCH 4/4] chore: add recommended extensions --- .vscode/extensions.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..6d5a557c --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["bufbuild.vscode-buf", "peterj.proto"] +}