From 264c15b5dbe555609ce8b70b5fcce72d0b85c917 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:31:35 -0500 Subject: [PATCH 1/4] feat: add getting inbox IDs --- proto/xmtpv4/message_api/message_api.proto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/proto/xmtpv4/message_api/message_api.proto b/proto/xmtpv4/message_api/message_api.proto index 70e371d..aeb6cac 100644 --- a/proto/xmtpv4/message_api/message_api.proto +++ b/proto/xmtpv4/message_api/message_api.proto @@ -4,6 +4,7 @@ syntax = "proto3"; package xmtp.xmtpv4; import "google/api/annotations.proto"; +import "identity/api/v1/identity.proto"; import "identity/associations/association.proto"; import "identity/associations/signature.proto"; import "mls/api/v1/mls.proto"; @@ -147,4 +148,11 @@ service ReplicationApi { body: "*" }; } + + rpc GetInboxIds(identity.api.v1.GetInboxIdsRequest) returns (identity.api.v1.GetInboxIdsResponse) { + option (google.api.http) = { + post: "/mls/v2/get-inbox-ids" + body: "*" + }; + } } From ed188ee840ee4f1a4d3f9aaf99317977e937ae5e Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:35:12 -0500 Subject: [PATCH 2/4] chore: fix import path --- proto/xmtpv4/message_api/message_api.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/xmtpv4/message_api/message_api.proto b/proto/xmtpv4/message_api/message_api.proto index aeb6cac..3931b7a 100644 --- a/proto/xmtpv4/message_api/message_api.proto +++ b/proto/xmtpv4/message_api/message_api.proto @@ -149,7 +149,7 @@ service ReplicationApi { }; } - rpc GetInboxIds(identity.api.v1.GetInboxIdsRequest) returns (identity.api.v1.GetInboxIdsResponse) { + rpc GetInboxIds(xmtp.identity.api.v1.GetInboxIdsRequest) returns (xmtp.identity.api.v1.GetInboxIdsResponse) { option (google.api.http) = { post: "/mls/v2/get-inbox-ids" body: "*" From c62fae9b88e2d493d25c72468142b6926ad11d90 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:36:55 -0500 Subject: [PATCH 3/4] feat: inline requests and responses --- proto/xmtpv4/message_api/message_api.proto | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/proto/xmtpv4/message_api/message_api.proto b/proto/xmtpv4/message_api/message_api.proto index 3931b7a..7047598 100644 --- a/proto/xmtpv4/message_api/message_api.proto +++ b/proto/xmtpv4/message_api/message_api.proto @@ -4,7 +4,6 @@ syntax = "proto3"; package xmtp.xmtpv4; import "google/api/annotations.proto"; -import "identity/api/v1/identity.proto"; import "identity/associations/association.proto"; import "identity/associations/signature.proto"; import "mls/api/v1/mls.proto"; @@ -123,6 +122,27 @@ message PublishEnvelopeResponse { OriginatorEnvelope originator_envelope = 1; } +// Request to retrieve the XIDs for the given addresses +message GetInboxIdsRequest { + // A single request for a given address + message Request { + string address = 1; + } + + repeated Request requests = 1; +} + +// Response with the XIDs for the requested addresses +message GetInboxIdsResponse { + // A single response for a given address + message Response { + string address = 1; + optional string inbox_id = 2; + } + + repeated Response responses = 1; +} + // Replication API service ReplicationApi { // Subscribe to envelopes @@ -149,7 +169,7 @@ service ReplicationApi { }; } - rpc GetInboxIds(xmtp.identity.api.v1.GetInboxIdsRequest) returns (xmtp.identity.api.v1.GetInboxIdsResponse) { + rpc GetInboxIds(GetInboxIdsRequest) returns (GetInboxIdsResponse) { option (google.api.http) = { post: "/mls/v2/get-inbox-ids" body: "*" From 532767c037707a80a70b6e6eb8aa7ef4474eaae0 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:03:17 -0400 Subject: [PATCH 4/4] fix: lint --- proto/xmtpv4/message_api/message_api.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/xmtpv4/message_api/message_api.proto b/proto/xmtpv4/message_api/message_api.proto index 7047598..2132a60 100644 --- a/proto/xmtpv4/message_api/message_api.proto +++ b/proto/xmtpv4/message_api/message_api.proto @@ -168,7 +168,7 @@ service ReplicationApi { body: "*" }; } - + // Get inbox ids rpc GetInboxIds(GetInboxIdsRequest) returns (GetInboxIdsResponse) { option (google.api.http) = { post: "/mls/v2/get-inbox-ids"