From c0d2921eb468eadcbb3427ef93b9f7ed2d3ba24b Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Fri, 19 Jan 2024 10:03:01 -0800 Subject: [PATCH] Generate protos in repo (#335) * Add buf.gen.yaml * Gen protos * Update build steps --- buf.gen.yaml | 28 + dev/generate | 7 +- go.mod | 1 - pkg/api/authentication.go | 4 +- pkg/api/authentication_test.go | 2 +- pkg/api/interceptor.go | 2 +- pkg/api/message/v1/client/grpc_client.go | 2 +- pkg/api/message/v1/client/grpc_stream.go | 2 +- pkg/api/message/v1/client/http_client.go | 2 +- pkg/api/message/v1/client/http_stream.go | 2 +- pkg/api/message/v1/client/interface.go | 2 +- pkg/api/message/v1/service.go | 2 +- pkg/api/server.go | 6 +- pkg/api/server_test.go | 2 +- pkg/api/setup_test.go | 2 +- pkg/api/token.go | 4 +- pkg/api/utils_test.go | 2 +- pkg/e2e/test_messagev1.go | 2 +- pkg/logging/logging.go | 2 +- pkg/metrics/api.go | 2 +- pkg/mls/api/v1/mock.gen.go | 10 +- pkg/mls/api/v1/service.go | 2 +- pkg/mls/api/v1/service_test.go | 2 +- pkg/mls/store/store.go | 2 +- pkg/mls/store/store_test.go | 2 +- pkg/mlsvalidate/service.go | 4 +- pkg/mlsvalidate/service_test.go | 2 +- pkg/proto/keystore_api/v1/keystore.pb.go | 3730 +++++++++++++++++ pkg/proto/message_api/v1/authn.pb.go | 278 ++ pkg/proto/message_api/v1/message_api.pb.go | 1122 +++++ pkg/proto/message_api/v1/message_api.pb.gw.go | 425 ++ .../message_api/v1/message_api_grpc.pb.go | 399 ++ pkg/proto/message_contents/ciphertext.pb.go | 454 ++ pkg/proto/message_contents/composite.pb.go | 277 ++ pkg/proto/message_contents/contact.pb.go | 352 ++ pkg/proto/message_contents/content.pb.go | 479 +++ .../conversation_reference.pb.go | 199 + pkg/proto/message_contents/ecies.pb.go | 183 + pkg/proto/message_contents/invitation.pb.go | 651 +++ pkg/proto/message_contents/message.pb.go | 688 +++ pkg/proto/message_contents/private_key.pb.go | 925 ++++ .../private_preferences.pb.go | 439 ++ pkg/proto/message_contents/public_key.pb.go | 699 +++ pkg/proto/message_contents/signature.pb.go | 361 ++ .../message_contents/signed_payload.pb.go | 177 + pkg/proto/mls/api/v1/mls.pb.go | 2844 +++++++++++++ pkg/proto/mls/api/v1/mls.pb.gw.go | 887 ++++ pkg/proto/mls/api/v1/mls_grpc.pb.go | 567 +++ pkg/proto/mls/database/intents.pb.go | 983 +++++ .../mls/message_contents/association.pb.go | 389 ++ pkg/proto/mls/message_contents/content.pb.go | 380 ++ .../mls/message_contents/credential.pb.go | 309 ++ .../mls/message_contents/group_metadata.pb.go | 668 +++ .../transcript_messages.pb.go | 304 ++ pkg/proto/mls_validation/v1/service.pb.go | 735 ++++ .../mls_validation/v1/service_grpc.pb.go | 152 + .../keystore_api/v1/keystore.swagger.json | 44 + .../openapi/message_api/v1/authn.swagger.json | 44 + .../message_api/v1/message_api.swagger.json | 400 ++ .../message_contents/ciphertext.swagger.json | 44 + .../message_contents/composite.swagger.json | 44 + .../message_contents/contact.swagger.json | 44 + .../message_contents/content.swagger.json | 44 + .../conversation_reference.swagger.json | 44 + .../message_contents/ecies.swagger.json | 44 + .../message_contents/invitation.swagger.json | 44 + .../message_contents/message.swagger.json | 44 + .../message_contents/private_key.swagger.json | 44 + .../private_preferences.swagger.json | 44 + .../message_contents/public_key.swagger.json | 44 + .../message_contents/signature.swagger.json | 44 + .../signed_payload.swagger.json | 44 + pkg/proto/openapi/mls/api/v1/mls.swagger.json | 925 ++++ .../openapi/mls/database/intents.swagger.json | 44 + .../message_contents/association.swagger.json | 44 + .../mls/message_contents/content.swagger.json | 44 + .../message_contents/credential.swagger.json | 44 + .../group_metadata.swagger.json | 44 + .../transcript_messages.swagger.json | 44 + .../mls_validation/v1/service.swagger.json | 137 + pkg/proto/openapi/openapi.go | 8 + pkg/store/cleaner_test.go | 2 +- pkg/store/query.go | 2 +- pkg/store/query_test.go | 2 +- pkg/store/store.go | 2 +- pkg/store/store_test.go | 2 +- pkg/testing/message.go | 2 +- 87 files changed, 22523 insertions(+), 41 deletions(-) create mode 100644 buf.gen.yaml create mode 100644 pkg/proto/keystore_api/v1/keystore.pb.go create mode 100644 pkg/proto/message_api/v1/authn.pb.go create mode 100644 pkg/proto/message_api/v1/message_api.pb.go create mode 100644 pkg/proto/message_api/v1/message_api.pb.gw.go create mode 100644 pkg/proto/message_api/v1/message_api_grpc.pb.go create mode 100644 pkg/proto/message_contents/ciphertext.pb.go create mode 100644 pkg/proto/message_contents/composite.pb.go create mode 100644 pkg/proto/message_contents/contact.pb.go create mode 100644 pkg/proto/message_contents/content.pb.go create mode 100644 pkg/proto/message_contents/conversation_reference.pb.go create mode 100644 pkg/proto/message_contents/ecies.pb.go create mode 100644 pkg/proto/message_contents/invitation.pb.go create mode 100644 pkg/proto/message_contents/message.pb.go create mode 100644 pkg/proto/message_contents/private_key.pb.go create mode 100644 pkg/proto/message_contents/private_preferences.pb.go create mode 100644 pkg/proto/message_contents/public_key.pb.go create mode 100644 pkg/proto/message_contents/signature.pb.go create mode 100644 pkg/proto/message_contents/signed_payload.pb.go create mode 100644 pkg/proto/mls/api/v1/mls.pb.go create mode 100644 pkg/proto/mls/api/v1/mls.pb.gw.go create mode 100644 pkg/proto/mls/api/v1/mls_grpc.pb.go create mode 100644 pkg/proto/mls/database/intents.pb.go create mode 100644 pkg/proto/mls/message_contents/association.pb.go create mode 100644 pkg/proto/mls/message_contents/content.pb.go create mode 100644 pkg/proto/mls/message_contents/credential.pb.go create mode 100644 pkg/proto/mls/message_contents/group_metadata.pb.go create mode 100644 pkg/proto/mls/message_contents/transcript_messages.pb.go create mode 100644 pkg/proto/mls_validation/v1/service.pb.go create mode 100644 pkg/proto/mls_validation/v1/service_grpc.pb.go create mode 100644 pkg/proto/openapi/keystore_api/v1/keystore.swagger.json create mode 100644 pkg/proto/openapi/message_api/v1/authn.swagger.json create mode 100644 pkg/proto/openapi/message_api/v1/message_api.swagger.json create mode 100644 pkg/proto/openapi/message_contents/ciphertext.swagger.json create mode 100644 pkg/proto/openapi/message_contents/composite.swagger.json create mode 100644 pkg/proto/openapi/message_contents/contact.swagger.json create mode 100644 pkg/proto/openapi/message_contents/content.swagger.json create mode 100644 pkg/proto/openapi/message_contents/conversation_reference.swagger.json create mode 100644 pkg/proto/openapi/message_contents/ecies.swagger.json create mode 100644 pkg/proto/openapi/message_contents/invitation.swagger.json create mode 100644 pkg/proto/openapi/message_contents/message.swagger.json create mode 100644 pkg/proto/openapi/message_contents/private_key.swagger.json create mode 100644 pkg/proto/openapi/message_contents/private_preferences.swagger.json create mode 100644 pkg/proto/openapi/message_contents/public_key.swagger.json create mode 100644 pkg/proto/openapi/message_contents/signature.swagger.json create mode 100644 pkg/proto/openapi/message_contents/signed_payload.swagger.json create mode 100644 pkg/proto/openapi/mls/api/v1/mls.swagger.json create mode 100644 pkg/proto/openapi/mls/database/intents.swagger.json create mode 100644 pkg/proto/openapi/mls/message_contents/association.swagger.json create mode 100644 pkg/proto/openapi/mls/message_contents/content.swagger.json create mode 100644 pkg/proto/openapi/mls/message_contents/credential.swagger.json create mode 100644 pkg/proto/openapi/mls/message_contents/group_metadata.swagger.json create mode 100644 pkg/proto/openapi/mls/message_contents/transcript_messages.swagger.json create mode 100644 pkg/proto/openapi/mls_validation/v1/service.swagger.json create mode 100644 pkg/proto/openapi/openapi.go diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 00000000..b963df66 --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,28 @@ +# buf.gen.yaml +version: v1 +managed: + enabled: true + go_package_prefix: + # : name in go.mod + # : where generated code should be output + default: github.com/xmtp/xmtp-node-go/pkg/proto + # Remove `except` field if googleapis is not used + except: + - buf.build/googleapis/googleapis + - buf.build/grpc-ecosystem/grpc-gateway +plugins: + - plugin: buf.build/grpc-ecosystem/gateway:v2.19.0 + out: pkg/proto + opt: + - paths=source_relative + - plugin: buf.build/grpc/go:v1.3.0 + out: pkg/proto + opt: + - paths=source_relative + # dependencies + - plugin: buf.build/protocolbuffers/go + out: pkg/proto + opt: + - paths=source_relative + - plugin: buf.build/grpc-ecosystem/openapiv2:v2.19.0 + out: pkg/proto/openapi diff --git a/dev/generate b/dev/generate index 871f9e74..77fc43eb 100755 --- a/dev/generate +++ b/dev/generate @@ -3,4 +3,9 @@ set -e go generate ./... -mockgen -package api github.com/xmtp/proto/v3/go/mls/api/v1 MlsApi_SubscribeGroupMessagesServer,MlsApi_SubscribeWelcomeMessagesServer > pkg/mls/api/v1/mock.gen.go +mockgen -package api github.com/xmtp/xmtp-node-go/pkg/proto/mls/api/v1 MlsApi_SubscribeGroupMessagesServer,MlsApi_SubscribeWelcomeMessagesServer > pkg/mls/api/v1/mock.gen.go +rm -rf pkg/proto/**/*.pb.go pkg/proto/**/*.pb.gw.go pkg/proto/**/*.swagger.json +if ! buf generate https://github.com/xmtp/proto.git#branch=main,subdir=proto; then + echo "Failed to generate protobuf definitions" + exit 1 +fi \ No newline at end of file diff --git a/go.mod b/go.mod index 3079b0da..faead68f 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,6 @@ require ( github.com/uptrace/bun/driver/pgdriver v1.1.16 github.com/waku-org/go-waku v0.8.0 github.com/xmtp/go-msgio v0.2.1-0.20220510223757-25a701b79cd3 - github.com/xmtp/proto/v3 v3.37.1-0.20240112125235-f02fe8d0f1a0 github.com/yoheimuta/protolint v0.39.0 go.uber.org/mock v0.4.0 go.uber.org/zap v1.24.0 diff --git a/pkg/api/authentication.go b/pkg/api/authentication.go index ee12d402..cb07aa24 100644 --- a/pkg/api/authentication.go +++ b/pkg/api/authentication.go @@ -7,9 +7,9 @@ import ( "fmt" "time" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" - envelope "github.com/xmtp/proto/v3/go/message_contents" "github.com/xmtp/xmtp-node-go/pkg/crypto" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" + envelope "github.com/xmtp/xmtp-node-go/pkg/proto/message_contents" "github.com/xmtp/xmtp-node-go/pkg/types" "go.uber.org/zap" "google.golang.org/protobuf/proto" diff --git a/pkg/api/authentication_test.go b/pkg/api/authentication_test.go index dd3f04c8..46447578 100644 --- a/pkg/api/authentication_test.go +++ b/pkg/api/authentication_test.go @@ -6,8 +6,8 @@ import ( "time" "github.com/stretchr/testify/require" - messageV1 "github.com/xmtp/proto/v3/go/message_api/v1" messageclient "github.com/xmtp/xmtp-node-go/pkg/api/message/v1/client" + messageV1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" ) func Test_AuthnNoToken(t *testing.T) { diff --git a/pkg/api/interceptor.go b/pkg/api/interceptor.go index 7b6c32c6..88af2697 100644 --- a/pkg/api/interceptor.go +++ b/pkg/api/interceptor.go @@ -11,8 +11,8 @@ import ( "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" "github.com/xmtp/xmtp-node-go/pkg/logging" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" "github.com/xmtp/xmtp-node-go/pkg/ratelimiter" "github.com/xmtp/xmtp-node-go/pkg/types" ) diff --git a/pkg/api/message/v1/client/grpc_client.go b/pkg/api/message/v1/client/grpc_client.go index 2c8ff539..016031c2 100644 --- a/pkg/api/message/v1/client/grpc_client.go +++ b/pkg/api/message/v1/client/grpc_client.go @@ -3,7 +3,7 @@ package client import ( "context" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" "google.golang.org/grpc" ) diff --git a/pkg/api/message/v1/client/grpc_stream.go b/pkg/api/message/v1/client/grpc_stream.go index a07d6950..238f9454 100644 --- a/pkg/api/message/v1/client/grpc_stream.go +++ b/pkg/api/message/v1/client/grpc_stream.go @@ -5,7 +5,7 @@ import ( "errors" "io" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/pkg/api/message/v1/client/http_client.go b/pkg/api/message/v1/client/http_client.go index 10b93b4d..1ba520cd 100644 --- a/pkg/api/message/v1/client/http_client.go +++ b/pkg/api/message/v1/client/http_client.go @@ -10,7 +10,7 @@ import ( "net/http" "github.com/hashicorp/go-retryablehttp" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" "go.uber.org/zap" "google.golang.org/grpc/metadata" "google.golang.org/protobuf/encoding/protojson" diff --git a/pkg/api/message/v1/client/http_stream.go b/pkg/api/message/v1/client/http_stream.go index 0948b0c2..87843c2c 100644 --- a/pkg/api/message/v1/client/http_stream.go +++ b/pkg/api/message/v1/client/http_stream.go @@ -8,7 +8,7 @@ import ( "io" "net/http" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" "go.uber.org/zap" "google.golang.org/protobuf/encoding/protojson" ) diff --git a/pkg/api/message/v1/client/interface.go b/pkg/api/message/v1/client/interface.go index c9c609e5..215daf55 100644 --- a/pkg/api/message/v1/client/interface.go +++ b/pkg/api/message/v1/client/interface.go @@ -3,7 +3,7 @@ package client import ( "context" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" ) type Client interface { diff --git a/pkg/api/message/v1/service.go b/pkg/api/message/v1/service.go index 9963903f..377127b1 100644 --- a/pkg/api/message/v1/service.go +++ b/pkg/api/message/v1/service.go @@ -14,10 +14,10 @@ import ( "github.com/nats-io/nats.go" "github.com/pkg/errors" wakupb "github.com/waku-org/go-waku/waku/v2/protocol/pb" - proto "github.com/xmtp/proto/v3/go/message_api/v1" apicontext "github.com/xmtp/xmtp-node-go/pkg/api/message/v1/context" "github.com/xmtp/xmtp-node-go/pkg/logging" "github.com/xmtp/xmtp-node-go/pkg/metrics" + proto "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" "github.com/xmtp/xmtp-node-go/pkg/store" "github.com/xmtp/xmtp-node-go/pkg/topic" "go.uber.org/zap" diff --git a/pkg/api/server.go b/pkg/api/server.go index ea9fabf7..267804a2 100644 --- a/pkg/api/server.go +++ b/pkg/api/server.go @@ -16,9 +16,9 @@ import ( swgui "github.com/swaggest/swgui/v3" wakupb "github.com/waku-org/go-waku/waku/v2/protocol/pb" wakurelay "github.com/waku-org/go-waku/waku/v2/protocol/relay" - proto "github.com/xmtp/proto/v3/go/message_api/v1" - mlsv1pb "github.com/xmtp/proto/v3/go/mls/api/v1" - messagev1openapi "github.com/xmtp/proto/v3/openapi/message_api/v1" + proto "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" + mlsv1pb "github.com/xmtp/xmtp-node-go/pkg/proto/mls/api/v1" + messagev1openapi "github.com/xmtp/xmtp-node-go/pkg/proto/openapi" "github.com/xmtp/xmtp-node-go/pkg/ratelimiter" "github.com/xmtp/xmtp-node-go/pkg/topic" "github.com/xmtp/xmtp-node-go/pkg/tracing" diff --git a/pkg/api/server_test.go b/pkg/api/server_test.go index df65d0b2..5273ce1e 100644 --- a/pkg/api/server_test.go +++ b/pkg/api/server_test.go @@ -11,9 +11,9 @@ import ( "time" "github.com/stretchr/testify/require" - messageV1 "github.com/xmtp/proto/v3/go/message_api/v1" messagev1api "github.com/xmtp/xmtp-node-go/pkg/api/message/v1" messageclient "github.com/xmtp/xmtp-node-go/pkg/api/message/v1/client" + messageV1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" "github.com/xmtp/xmtp-node-go/pkg/ratelimiter" test "github.com/xmtp/xmtp-node-go/pkg/testing" "google.golang.org/grpc/codes" diff --git a/pkg/api/setup_test.go b/pkg/api/setup_test.go index 3d73f231..806f9c1d 100644 --- a/pkg/api/setup_test.go +++ b/pkg/api/setup_test.go @@ -6,9 +6,9 @@ import ( "time" "github.com/stretchr/testify/require" - v1 "github.com/xmtp/proto/v3/go/message_api/v1" messageclient "github.com/xmtp/xmtp-node-go/pkg/api/message/v1/client" "github.com/xmtp/xmtp-node-go/pkg/authz" + v1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" "github.com/xmtp/xmtp-node-go/pkg/store" test "github.com/xmtp/xmtp-node-go/pkg/testing" "go.uber.org/zap" diff --git a/pkg/api/token.go b/pkg/api/token.go index 6f2f9ed5..a6bcb03c 100644 --- a/pkg/api/token.go +++ b/pkg/api/token.go @@ -6,9 +6,9 @@ import ( "time" ethcrypto "github.com/ethereum/go-ethereum/crypto" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" - envelope "github.com/xmtp/proto/v3/go/message_contents" "github.com/xmtp/xmtp-node-go/pkg/crypto" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" + envelope "github.com/xmtp/xmtp-node-go/pkg/proto/message_contents" "google.golang.org/protobuf/proto" ) diff --git a/pkg/api/utils_test.go b/pkg/api/utils_test.go index 5c708145..3cc3f9ad 100644 --- a/pkg/api/utils_test.go +++ b/pkg/api/utils_test.go @@ -9,8 +9,8 @@ import ( "time" "github.com/stretchr/testify/require" - messageV1 "github.com/xmtp/proto/v3/go/message_api/v1" messageclient "github.com/xmtp/xmtp-node-go/pkg/api/message/v1/client" + messageV1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" ) func makeEnvelopes(count int) (envs []*messageV1.Envelope) { diff --git a/pkg/e2e/test_messagev1.go b/pkg/e2e/test_messagev1.go index 25df308f..3fb71cc0 100644 --- a/pkg/e2e/test_messagev1.go +++ b/pkg/e2e/test_messagev1.go @@ -11,8 +11,8 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/pkg/errors" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" messageclient "github.com/xmtp/xmtp-node-go/pkg/api/message/v1/client" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" "go.uber.org/zap" "google.golang.org/protobuf/proto" ) diff --git a/pkg/logging/logging.go b/pkg/logging/logging.go index d9b7a076..e5df3e7d 100644 --- a/pkg/logging/logging.go +++ b/pkg/logging/logging.go @@ -10,7 +10,7 @@ import ( "fmt" "github.com/waku-org/go-waku/logging" - proto "github.com/xmtp/proto/v3/go/message_api/v1" + proto "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" "github.com/xmtp/xmtp-node-go/pkg/types" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/pkg/metrics/api.go b/pkg/metrics/api.go index dd5cf73d..baeba027 100644 --- a/pkg/metrics/api.go +++ b/pkg/metrics/api.go @@ -5,9 +5,9 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" - proto "github.com/xmtp/proto/v3/go/message_api/v1" apicontext "github.com/xmtp/xmtp-node-go/pkg/api/message/v1/context" "github.com/xmtp/xmtp-node-go/pkg/logging" + proto "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" "github.com/xmtp/xmtp-node-go/pkg/topic" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/pkg/mls/api/v1/mock.gen.go b/pkg/mls/api/v1/mock.gen.go index 846dbf10..3c23a6ef 100644 --- a/pkg/mls/api/v1/mock.gen.go +++ b/pkg/mls/api/v1/mock.gen.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/xmtp/proto/v3/go/mls/api/v1 (interfaces: MlsApi_SubscribeGroupMessagesServer,MlsApi_SubscribeWelcomeMessagesServer) +// Source: github.com/xmtp/xmtp-node-go/pkg/proto/mls/api/v1 (interfaces: MlsApi_SubscribeGroupMessagesServer,MlsApi_SubscribeWelcomeMessagesServer) // // Generated by this command: // -// mockgen -package api github.com/xmtp/proto/v3/go/mls/api/v1 MlsApi_SubscribeGroupMessagesServer,MlsApi_SubscribeWelcomeMessagesServer +// mockgen -package api github.com/xmtp/xmtp-node-go/pkg/proto/mls/api/v1 MlsApi_SubscribeGroupMessagesServer,MlsApi_SubscribeWelcomeMessagesServer // // Package api is a generated GoMock package. @@ -13,7 +13,7 @@ import ( context "context" reflect "reflect" - v1 "github.com/xmtp/proto/v3/go/mls/api/v1" + apiv1 "github.com/xmtp/xmtp-node-go/pkg/proto/mls/api/v1" gomock "go.uber.org/mock/gomock" metadata "google.golang.org/grpc/metadata" ) @@ -70,7 +70,7 @@ func (mr *MockMlsApi_SubscribeGroupMessagesServerMockRecorder) RecvMsg(arg0 any) } // Send mocks base method. -func (m *MockMlsApi_SubscribeGroupMessagesServer) Send(arg0 *v1.GroupMessage) error { +func (m *MockMlsApi_SubscribeGroupMessagesServer) Send(arg0 *apiv1.GroupMessage) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Send", arg0) ret0, _ := ret[0].(error) @@ -189,7 +189,7 @@ func (mr *MockMlsApi_SubscribeWelcomeMessagesServerMockRecorder) RecvMsg(arg0 an } // Send mocks base method. -func (m *MockMlsApi_SubscribeWelcomeMessagesServer) Send(arg0 *v1.WelcomeMessage) error { +func (m *MockMlsApi_SubscribeWelcomeMessagesServer) Send(arg0 *apiv1.WelcomeMessage) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Send", arg0) ret0, _ := ret[0].(error) diff --git a/pkg/mls/api/v1/service.go b/pkg/mls/api/v1/service.go index 7695cb88..348c149c 100644 --- a/pkg/mls/api/v1/service.go +++ b/pkg/mls/api/v1/service.go @@ -12,9 +12,9 @@ import ( "github.com/nats-io/nats-server/v2/server" "github.com/nats-io/nats.go" wakupb "github.com/waku-org/go-waku/waku/v2/protocol/pb" - mlsv1 "github.com/xmtp/proto/v3/go/mls/api/v1" mlsstore "github.com/xmtp/xmtp-node-go/pkg/mls/store" "github.com/xmtp/xmtp-node-go/pkg/mlsvalidate" + mlsv1 "github.com/xmtp/xmtp-node-go/pkg/proto/mls/api/v1" "github.com/xmtp/xmtp-node-go/pkg/topic" "go.uber.org/zap" "google.golang.org/grpc/codes" diff --git a/pkg/mls/api/v1/service_test.go b/pkg/mls/api/v1/service_test.go index d725318b..a13495ca 100644 --- a/pkg/mls/api/v1/service_test.go +++ b/pkg/mls/api/v1/service_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/require" "github.com/uptrace/bun" wakupb "github.com/waku-org/go-waku/waku/v2/protocol/pb" - mlsv1 "github.com/xmtp/proto/v3/go/mls/api/v1" mlsstore "github.com/xmtp/xmtp-node-go/pkg/mls/store" "github.com/xmtp/xmtp-node-go/pkg/mlsvalidate" + mlsv1 "github.com/xmtp/xmtp-node-go/pkg/proto/mls/api/v1" test "github.com/xmtp/xmtp-node-go/pkg/testing" "github.com/xmtp/xmtp-node-go/pkg/topic" "go.uber.org/mock/gomock" diff --git a/pkg/mls/store/store.go b/pkg/mls/store/store.go index 8e64318b..34d48207 100644 --- a/pkg/mls/store/store.go +++ b/pkg/mls/store/store.go @@ -10,8 +10,8 @@ import ( "github.com/uptrace/bun" "github.com/uptrace/bun/migrate" - mlsv1 "github.com/xmtp/proto/v3/go/mls/api/v1" migrations "github.com/xmtp/xmtp-node-go/pkg/migrations/mls" + mlsv1 "github.com/xmtp/xmtp-node-go/pkg/proto/mls/api/v1" "go.uber.org/zap" ) diff --git a/pkg/mls/store/store_test.go b/pkg/mls/store/store_test.go index 569b09c0..9f196110 100644 --- a/pkg/mls/store/store_test.go +++ b/pkg/mls/store/store_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/stretchr/testify/require" - mlsv1 "github.com/xmtp/proto/v3/go/mls/api/v1" + mlsv1 "github.com/xmtp/xmtp-node-go/pkg/proto/mls/api/v1" test "github.com/xmtp/xmtp-node-go/pkg/testing" ) diff --git a/pkg/mlsvalidate/service.go b/pkg/mlsvalidate/service.go index ed9f5b11..a950d159 100644 --- a/pkg/mlsvalidate/service.go +++ b/pkg/mlsvalidate/service.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - mlsv1 "github.com/xmtp/proto/v3/go/mls/api/v1" - svc "github.com/xmtp/proto/v3/go/mls_validation/v1" + mlsv1 "github.com/xmtp/xmtp-node-go/pkg/proto/mls/api/v1" + svc "github.com/xmtp/xmtp-node-go/pkg/proto/mls_validation/v1" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) diff --git a/pkg/mlsvalidate/service_test.go b/pkg/mlsvalidate/service_test.go index 6e0a7332..01857927 100644 --- a/pkg/mlsvalidate/service_test.go +++ b/pkg/mlsvalidate/service_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - svc "github.com/xmtp/proto/v3/go/mls_validation/v1" + svc "github.com/xmtp/xmtp-node-go/pkg/proto/mls_validation/v1" "google.golang.org/grpc" ) diff --git a/pkg/proto/keystore_api/v1/keystore.pb.go b/pkg/proto/keystore_api/v1/keystore.pb.go new file mode 100644 index 00000000..ea798049 --- /dev/null +++ b/pkg/proto/keystore_api/v1/keystore.pb.go @@ -0,0 +1,3730 @@ +// Message content encoding structures + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: keystore_api/v1/keystore.proto + +package keystore_apiv1 + +import ( + message_contents "github.com/xmtp/xmtp-node-go/pkg/proto/message_contents" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Application-specific error codes for the Keystore API. +type ErrorCode int32 + +const ( + ErrorCode_ERROR_CODE_UNSPECIFIED ErrorCode = 0 + ErrorCode_ERROR_CODE_INVALID_INPUT ErrorCode = 1 + ErrorCode_ERROR_CODE_NO_MATCHING_PREKEY ErrorCode = 2 +) + +// Enum value maps for ErrorCode. +var ( + ErrorCode_name = map[int32]string{ + 0: "ERROR_CODE_UNSPECIFIED", + 1: "ERROR_CODE_INVALID_INPUT", + 2: "ERROR_CODE_NO_MATCHING_PREKEY", + } + ErrorCode_value = map[string]int32{ + "ERROR_CODE_UNSPECIFIED": 0, + "ERROR_CODE_INVALID_INPUT": 1, + "ERROR_CODE_NO_MATCHING_PREKEY": 2, + } +) + +func (x ErrorCode) Enum() *ErrorCode { + p := new(ErrorCode) + *p = x + return p +} + +func (x ErrorCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrorCode) Descriptor() protoreflect.EnumDescriptor { + return file_keystore_api_v1_keystore_proto_enumTypes[0].Descriptor() +} + +func (ErrorCode) Type() protoreflect.EnumType { + return &file_keystore_api_v1_keystore_proto_enumTypes[0] +} + +func (x ErrorCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ErrorCode.Descriptor instead. +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 + JobType_JOB_TYPE_REFRESH_PPPP JobType = 3 +) + +// 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", + 3: "JOB_TYPE_REFRESH_PPPP", + } + JobType_value = map[string]int32{ + "JOB_TYPE_UNSPECIFIED": 0, + "JOB_TYPE_REFRESH_V1": 1, + "JOB_TYPE_REFRESH_V2": 2, + "JOB_TYPE_REFRESH_PPPP": 3, + } +) + +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 + +const ( + GetKeystoreStatusResponse_KEYSTORE_STATUS_UNSPECIFIED GetKeystoreStatusResponse_KeystoreStatus = 0 + GetKeystoreStatusResponse_KEYSTORE_STATUS_UNINITIALIZED GetKeystoreStatusResponse_KeystoreStatus = 1 + GetKeystoreStatusResponse_KEYSTORE_STATUS_INITIALIZED GetKeystoreStatusResponse_KeystoreStatus = 2 +) + +// Enum value maps for GetKeystoreStatusResponse_KeystoreStatus. +var ( + GetKeystoreStatusResponse_KeystoreStatus_name = map[int32]string{ + 0: "KEYSTORE_STATUS_UNSPECIFIED", + 1: "KEYSTORE_STATUS_UNINITIALIZED", + 2: "KEYSTORE_STATUS_INITIALIZED", + } + GetKeystoreStatusResponse_KeystoreStatus_value = map[string]int32{ + "KEYSTORE_STATUS_UNSPECIFIED": 0, + "KEYSTORE_STATUS_UNINITIALIZED": 1, + "KEYSTORE_STATUS_INITIALIZED": 2, + } +) + +func (x GetKeystoreStatusResponse_KeystoreStatus) Enum() *GetKeystoreStatusResponse_KeystoreStatus { + p := new(GetKeystoreStatusResponse_KeystoreStatus) + *p = x + return p +} + +func (x GetKeystoreStatusResponse_KeystoreStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GetKeystoreStatusResponse_KeystoreStatus) Descriptor() protoreflect.EnumDescriptor { + return file_keystore_api_v1_keystore_proto_enumTypes[2].Descriptor() +} + +func (GetKeystoreStatusResponse_KeystoreStatus) Type() protoreflect.EnumType { + return &file_keystore_api_v1_keystore_proto_enumTypes[2] +} + +func (x GetKeystoreStatusResponse_KeystoreStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GetKeystoreStatusResponse_KeystoreStatus.Descriptor instead. +func (GetKeystoreStatusResponse_KeystoreStatus) EnumDescriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{20, 0} +} + +// Wrapper class for errors from the Keystore API +type KeystoreError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Code ErrorCode `protobuf:"varint,2,opt,name=code,proto3,enum=xmtp.keystore_api.v1.ErrorCode" json:"code,omitempty"` +} + +func (x *KeystoreError) Reset() { + *x = KeystoreError{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeystoreError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeystoreError) ProtoMessage() {} + +func (x *KeystoreError) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[0] + 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 KeystoreError.ProtoReflect.Descriptor instead. +func (*KeystoreError) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{0} +} + +func (x *KeystoreError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *KeystoreError) GetCode() ErrorCode { + if x != nil { + return x.Code + } + return ErrorCode_ERROR_CODE_UNSPECIFIED +} + +// Decrypt a batch of messages using X3DH key agreement +type DecryptV1Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Requests []*DecryptV1Request_Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *DecryptV1Request) Reset() { + *x = DecryptV1Request{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecryptV1Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecryptV1Request) ProtoMessage() {} + +func (x *DecryptV1Request) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[1] + 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 DecryptV1Request.ProtoReflect.Descriptor instead. +func (*DecryptV1Request) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{1} +} + +func (x *DecryptV1Request) GetRequests() []*DecryptV1Request_Request { + if x != nil { + return x.Requests + } + return nil +} + +// Response type for both V1 and V2 decryption requests +type DecryptResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*DecryptResponse_Response `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *DecryptResponse) Reset() { + *x = DecryptResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecryptResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecryptResponse) ProtoMessage() {} + +func (x *DecryptResponse) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[2] + 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 DecryptResponse.ProtoReflect.Descriptor instead. +func (*DecryptResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{2} +} + +func (x *DecryptResponse) GetResponses() []*DecryptResponse_Response { + if x != nil { + return x.Responses + } + return nil +} + +// Decrypt a batch of messages using the appropriate topic keys +type DecryptV2Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Requests []*DecryptV2Request_Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *DecryptV2Request) Reset() { + *x = DecryptV2Request{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecryptV2Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecryptV2Request) ProtoMessage() {} + +func (x *DecryptV2Request) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[3] + 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 DecryptV2Request.ProtoReflect.Descriptor instead. +func (*DecryptV2Request) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{3} +} + +func (x *DecryptV2Request) GetRequests() []*DecryptV2Request_Request { + if x != nil { + return x.Requests + } + return nil +} + +// Encrypt a batch of messages using X3DH key agreement +type EncryptV1Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Requests []*EncryptV1Request_Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *EncryptV1Request) Reset() { + *x = EncryptV1Request{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncryptV1Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncryptV1Request) ProtoMessage() {} + +func (x *EncryptV1Request) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[4] + 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 EncryptV1Request.ProtoReflect.Descriptor instead. +func (*EncryptV1Request) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{4} +} + +func (x *EncryptV1Request) GetRequests() []*EncryptV1Request_Request { + if x != nil { + return x.Requests + } + return nil +} + +// Response type for both V1 and V2 encryption requests +type EncryptResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*EncryptResponse_Response `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *EncryptResponse) Reset() { + *x = EncryptResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncryptResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncryptResponse) ProtoMessage() {} + +func (x *EncryptResponse) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[5] + 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 EncryptResponse.ProtoReflect.Descriptor instead. +func (*EncryptResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{5} +} + +func (x *EncryptResponse) GetResponses() []*EncryptResponse_Response { + if x != nil { + return x.Responses + } + return nil +} + +// Encrypt a batch of messages using the appropriate topic keys +type EncryptV2Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Requests []*EncryptV2Request_Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *EncryptV2Request) Reset() { + *x = EncryptV2Request{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncryptV2Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncryptV2Request) ProtoMessage() {} + +func (x *EncryptV2Request) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[6] + 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 EncryptV2Request.ProtoReflect.Descriptor instead. +func (*EncryptV2Request) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{6} +} + +func (x *EncryptV2Request) GetRequests() []*EncryptV2Request_Request { + if x != nil { + return x.Requests + } + return nil +} + +// Encrypt a message for yourself +type SelfEncryptRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Requests []*SelfEncryptRequest_Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *SelfEncryptRequest) Reset() { + *x = SelfEncryptRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SelfEncryptRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SelfEncryptRequest) ProtoMessage() {} + +func (x *SelfEncryptRequest) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[7] + 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 SelfEncryptRequest.ProtoReflect.Descriptor instead. +func (*SelfEncryptRequest) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{7} +} + +func (x *SelfEncryptRequest) GetRequests() []*SelfEncryptRequest_Request { + if x != nil { + return x.Requests + } + return nil +} + +// Response type for SelfEncryptRequest +type SelfEncryptResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*SelfEncryptResponse_Response `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *SelfEncryptResponse) Reset() { + *x = SelfEncryptResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SelfEncryptResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SelfEncryptResponse) ProtoMessage() {} + +func (x *SelfEncryptResponse) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[8] + 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 SelfEncryptResponse.ProtoReflect.Descriptor instead. +func (*SelfEncryptResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{8} +} + +func (x *SelfEncryptResponse) GetResponses() []*SelfEncryptResponse_Response { + if x != nil { + return x.Responses + } + return nil +} + +// SelfDecryptRequest +type SelfDecryptRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Requests []*SelfDecryptRequest_Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *SelfDecryptRequest) Reset() { + *x = SelfDecryptRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SelfDecryptRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SelfDecryptRequest) ProtoMessage() {} + +func (x *SelfDecryptRequest) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[9] + 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 SelfDecryptRequest.ProtoReflect.Descriptor instead. +func (*SelfDecryptRequest) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{9} +} + +func (x *SelfDecryptRequest) GetRequests() []*SelfDecryptRequest_Request { + if x != nil { + return x.Requests + } + return nil +} + +// Get the private preferences topic identifier +type GetPrivatePreferencesTopicIdentifierResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` +} + +func (x *GetPrivatePreferencesTopicIdentifierResponse) Reset() { + *x = GetPrivatePreferencesTopicIdentifierResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPrivatePreferencesTopicIdentifierResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPrivatePreferencesTopicIdentifierResponse) ProtoMessage() {} + +func (x *GetPrivatePreferencesTopicIdentifierResponse) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[10] + 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 GetPrivatePreferencesTopicIdentifierResponse.ProtoReflect.Descriptor instead. +func (*GetPrivatePreferencesTopicIdentifierResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{10} +} + +func (x *GetPrivatePreferencesTopicIdentifierResponse) GetIdentifier() string { + if x != nil { + return x.Identifier + } + return "" +} + +// Request to create an invite payload, and store the topic keys in the Keystore +type CreateInviteRequest 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"` + Recipient *message_contents.SignedPublicKeyBundle `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + CreatedNs uint64 `protobuf:"varint,3,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` +} + +func (x *CreateInviteRequest) Reset() { + *x = CreateInviteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateInviteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateInviteRequest) ProtoMessage() {} + +func (x *CreateInviteRequest) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[11] + 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 CreateInviteRequest.ProtoReflect.Descriptor instead. +func (*CreateInviteRequest) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{11} +} + +func (x *CreateInviteRequest) GetContext() *message_contents.InvitationV1_Context { + if x != nil { + return x.Context + } + return nil +} + +func (x *CreateInviteRequest) GetRecipient() *message_contents.SignedPublicKeyBundle { + if x != nil { + return x.Recipient + } + return nil +} + +func (x *CreateInviteRequest) GetCreatedNs() uint64 { + if x != nil { + return x.CreatedNs + } + return 0 +} + +// Response to a CreateInviteRequest +type CreateInviteResponse 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"` +} + +func (x *CreateInviteResponse) Reset() { + *x = CreateInviteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateInviteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateInviteResponse) ProtoMessage() {} + +func (x *CreateInviteResponse) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[12] + 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 CreateInviteResponse.ProtoReflect.Descriptor instead. +func (*CreateInviteResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{12} +} + +func (x *CreateInviteResponse) GetConversation() *message_contents.ConversationReference { + if x != nil { + return x.Conversation + } + return nil +} + +func (x *CreateInviteResponse) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// Request to save a batch of invite messages to the Keystore +type SaveInvitesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Requests []*SaveInvitesRequest_Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *SaveInvitesRequest) Reset() { + *x = SaveInvitesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveInvitesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveInvitesRequest) ProtoMessage() {} + +func (x *SaveInvitesRequest) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[13] + 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 SaveInvitesRequest.ProtoReflect.Descriptor instead. +func (*SaveInvitesRequest) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{13} +} + +func (x *SaveInvitesRequest) GetRequests() []*SaveInvitesRequest_Request { + if x != nil { + return x.Requests + } + return nil +} + +// Response to a SaveInvitesRequest +type SaveInvitesResponse 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{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveInvitesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveInvitesResponse) ProtoMessage() {} + +func (x *SaveInvitesResponse) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[14] + 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 SaveInvitesResponse.ProtoReflect.Descriptor instead. +func (*SaveInvitesResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{14} +} + +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 { + 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"` +} + +func (x *CreateAuthTokenRequest) Reset() { + *x = CreateAuthTokenRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAuthTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAuthTokenRequest) ProtoMessage() {} + +func (x *CreateAuthTokenRequest) 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 CreateAuthTokenRequest.ProtoReflect.Descriptor instead. +func (*CreateAuthTokenRequest) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{15} +} + +func (x *CreateAuthTokenRequest) GetTimestampNs() uint64 { + if x != nil && x.TimestampNs != nil { + return *x.TimestampNs + } + return 0 +} + +// 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 + + Conversations []*message_contents.ConversationReference `protobuf:"bytes,1,rep,name=conversations,proto3" json:"conversations,omitempty"` +} + +func (x *SaveV1ConversationsRequest) Reset() { + *x = SaveV1ConversationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveV1ConversationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveV1ConversationsRequest) ProtoMessage() {} + +func (x *SaveV1ConversationsRequest) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SaveV1ConversationsRequest.ProtoReflect.Descriptor instead. +func (*SaveV1ConversationsRequest) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{16} +} + +func (x *SaveV1ConversationsRequest) GetConversations() []*message_contents.ConversationReference { + if x != nil { + return x.Conversations + } + return nil +} + +// Placeholder response type for SaveV1Conversations +type SaveV1ConversationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SaveV1ConversationsResponse) Reset() { + *x = SaveV1ConversationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveV1ConversationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveV1ConversationsResponse) ProtoMessage() {} + +func (x *SaveV1ConversationsResponse) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SaveV1ConversationsResponse.ProtoReflect.Descriptor instead. +func (*SaveV1ConversationsResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{17} +} + +// Response for GetV2Conversations +type GetConversationsResponse 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 *GetConversationsResponse) Reset() { + *x = GetConversationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConversationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConversationsResponse) ProtoMessage() {} + +func (x *GetConversationsResponse) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConversationsResponse.ProtoReflect.Descriptor instead. +func (*GetConversationsResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{18} +} + +func (x *GetConversationsResponse) GetConversations() []*message_contents.ConversationReference { + if x != nil { + return x.Conversations + } + return nil +} + +// Used to check if the Keystore implementation has been setup for the given +// wallet address Only used for MM Snap Keystore currently +type GetKeystoreStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` +} + +func (x *GetKeystoreStatusRequest) Reset() { + *x = GetKeystoreStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetKeystoreStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetKeystoreStatusRequest) ProtoMessage() {} + +func (x *GetKeystoreStatusRequest) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetKeystoreStatusRequest.ProtoReflect.Descriptor instead. +func (*GetKeystoreStatusRequest) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{19} +} + +func (x *GetKeystoreStatusRequest) GetWalletAddress() string { + if x != nil { + return x.WalletAddress + } + return "" +} + +// Response to GetKeystoreStatusRequest +type GetKeystoreStatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status GetKeystoreStatusResponse_KeystoreStatus `protobuf:"varint,1,opt,name=status,proto3,enum=xmtp.keystore_api.v1.GetKeystoreStatusResponse_KeystoreStatus" json:"status,omitempty"` +} + +func (x *GetKeystoreStatusResponse) Reset() { + *x = GetKeystoreStatusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetKeystoreStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetKeystoreStatusResponse) ProtoMessage() {} + +func (x *GetKeystoreStatusResponse) 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 GetKeystoreStatusResponse.ProtoReflect.Descriptor instead. +func (*GetKeystoreStatusResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{20} +} + +func (x *GetKeystoreStatusResponse) GetStatus() GetKeystoreStatusResponse_KeystoreStatus { + if x != nil { + return x.Status + } + return GetKeystoreStatusResponse_KEYSTORE_STATUS_UNSPECIFIED +} + +// Used to initialize the Keystore with a private key bundle retrieved from the +// client +type InitKeystoreRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Bundle: + // + // *InitKeystoreRequest_V1 + Bundle isInitKeystoreRequest_Bundle `protobuf_oneof:"bundle"` +} + +func (x *InitKeystoreRequest) Reset() { + *x = InitKeystoreRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InitKeystoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitKeystoreRequest) ProtoMessage() {} + +func (x *InitKeystoreRequest) 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 InitKeystoreRequest.ProtoReflect.Descriptor instead. +func (*InitKeystoreRequest) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{21} +} + +func (m *InitKeystoreRequest) GetBundle() isInitKeystoreRequest_Bundle { + if m != nil { + return m.Bundle + } + return nil +} + +func (x *InitKeystoreRequest) GetV1() *message_contents.PrivateKeyBundleV1 { + if x, ok := x.GetBundle().(*InitKeystoreRequest_V1); ok { + return x.V1 + } + return nil +} + +type isInitKeystoreRequest_Bundle interface { + isInitKeystoreRequest_Bundle() +} + +type InitKeystoreRequest_V1 struct { + V1 *message_contents.PrivateKeyBundleV1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*InitKeystoreRequest_V1) isInitKeystoreRequest_Bundle() {} + +// Response to the request to initialize the Keystore +type InitKeystoreResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error *KeystoreError `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *InitKeystoreResponse) Reset() { + *x = InitKeystoreResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InitKeystoreResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitKeystoreResponse) ProtoMessage() {} + +func (x *InitKeystoreResponse) 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 InitKeystoreResponse.ProtoReflect.Descriptor instead. +func (*InitKeystoreResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{22} +} + +func (x *InitKeystoreResponse) GetError() *KeystoreError { + if x != nil { + return x.Error + } + return nil +} + +// SignDigestRequest is used to sign a digest with either the identity key +// or a prekey +type SignDigestRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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"` +} + +func (x *SignDigestRequest) Reset() { + *x = SignDigestRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignDigestRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignDigestRequest) ProtoMessage() {} + +func (x *SignDigestRequest) 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 SignDigestRequest.ProtoReflect.Descriptor instead. +func (*SignDigestRequest) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{23} +} + +func (x *SignDigestRequest) GetDigest() []byte { + if x != nil { + return x.Digest + } + return nil +} + +func (m *SignDigestRequest) GetSigner() isSignDigestRequest_Signer { + if m != nil { + return m.Signer + } + return nil +} + +func (x *SignDigestRequest) GetIdentityKey() bool { + if x, ok := x.GetSigner().(*SignDigestRequest_IdentityKey); ok { + return x.IdentityKey + } + return false +} + +func (x *SignDigestRequest) GetPrekeyIndex() uint32 { + if x, ok := x.GetSigner().(*SignDigestRequest_PrekeyIndex); ok { + return x.PrekeyIndex + } + return 0 +} + +type isSignDigestRequest_Signer interface { + isSignDigestRequest_Signer() +} + +type SignDigestRequest_IdentityKey struct { + IdentityKey bool `protobuf:"varint,2,opt,name=identity_key,json=identityKey,proto3,oneof"` +} + +type SignDigestRequest_PrekeyIndex struct { + PrekeyIndex uint32 `protobuf:"varint,3,opt,name=prekey_index,json=prekeyIndex,proto3,oneof"` +} + +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[24] + 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[24] + 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{24} +} + +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[25] + 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[25] + 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{25} +} + +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[26] + 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[26] + 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{26} +} + +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[27] + 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[27] + 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{27} +} + +// A mapping of topics to their decrypted invitations +type TopicMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Topics map[string]*TopicMap_TopicData `protobuf:"bytes,1,rep,name=topics,proto3" json:"topics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *TopicMap) Reset() { + *x = TopicMap{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TopicMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TopicMap) ProtoMessage() {} + +func (x *TopicMap) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TopicMap.ProtoReflect.Descriptor instead. +func (*TopicMap) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{28} +} + +func (x *TopicMap) GetTopics() map[string]*TopicMap_TopicData { + if x != nil { + return x.Topics + } + return nil +} + +// A single decryption request +type DecryptV1Request_Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload *message_contents.Ciphertext `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + PeerKeys *message_contents.PublicKeyBundle `protobuf:"bytes,2,opt,name=peer_keys,json=peerKeys,proto3" json:"peer_keys,omitempty"` + HeaderBytes []byte `protobuf:"bytes,3,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` + IsSender bool `protobuf:"varint,4,opt,name=is_sender,json=isSender,proto3" json:"is_sender,omitempty"` +} + +func (x *DecryptV1Request_Request) Reset() { + *x = DecryptV1Request_Request{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecryptV1Request_Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecryptV1Request_Request) ProtoMessage() {} + +func (x *DecryptV1Request_Request) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecryptV1Request_Request.ProtoReflect.Descriptor instead. +func (*DecryptV1Request_Request) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *DecryptV1Request_Request) GetPayload() *message_contents.Ciphertext { + if x != nil { + return x.Payload + } + return nil +} + +func (x *DecryptV1Request_Request) GetPeerKeys() *message_contents.PublicKeyBundle { + if x != nil { + return x.PeerKeys + } + return nil +} + +func (x *DecryptV1Request_Request) GetHeaderBytes() []byte { + if x != nil { + return x.HeaderBytes + } + return nil +} + +func (x *DecryptV1Request_Request) GetIsSender() bool { + if x != nil { + return x.IsSender + } + return false +} + +// A single decryption response +type DecryptResponse_Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *DecryptResponse_Response_Result + // *DecryptResponse_Response_Error + Response isDecryptResponse_Response_Response `protobuf_oneof:"response"` +} + +func (x *DecryptResponse_Response) Reset() { + *x = DecryptResponse_Response{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecryptResponse_Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecryptResponse_Response) ProtoMessage() {} + +func (x *DecryptResponse_Response) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecryptResponse_Response.ProtoReflect.Descriptor instead. +func (*DecryptResponse_Response) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{2, 0} +} + +func (m *DecryptResponse_Response) GetResponse() isDecryptResponse_Response_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *DecryptResponse_Response) GetResult() *DecryptResponse_Response_Success { + if x, ok := x.GetResponse().(*DecryptResponse_Response_Result); ok { + return x.Result + } + return nil +} + +func (x *DecryptResponse_Response) GetError() *KeystoreError { + if x, ok := x.GetResponse().(*DecryptResponse_Response_Error); ok { + return x.Error + } + return nil +} + +type isDecryptResponse_Response_Response interface { + isDecryptResponse_Response_Response() +} + +type DecryptResponse_Response_Result struct { + Result *DecryptResponse_Response_Success `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +} + +type DecryptResponse_Response_Error struct { + Error *KeystoreError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*DecryptResponse_Response_Result) isDecryptResponse_Response_Response() {} + +func (*DecryptResponse_Response_Error) isDecryptResponse_Response_Response() {} + +// Wrapper object for success response +type DecryptResponse_Response_Success struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Decrypted []byte `protobuf:"bytes,1,opt,name=decrypted,proto3" json:"decrypted,omitempty"` +} + +func (x *DecryptResponse_Response_Success) Reset() { + *x = DecryptResponse_Response_Success{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecryptResponse_Response_Success) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecryptResponse_Response_Success) ProtoMessage() {} + +func (x *DecryptResponse_Response_Success) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecryptResponse_Response_Success.ProtoReflect.Descriptor instead. +func (*DecryptResponse_Response_Success) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{2, 0, 0} +} + +func (x *DecryptResponse_Response_Success) GetDecrypted() []byte { + if x != nil { + return x.Decrypted + } + return nil +} + +// A single decryption request +type DecryptV2Request_Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload *message_contents.Ciphertext `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + HeaderBytes []byte `protobuf:"bytes,2,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` + ContentTopic string `protobuf:"bytes,3,opt,name=content_topic,json=contentTopic,proto3" json:"content_topic,omitempty"` +} + +func (x *DecryptV2Request_Request) Reset() { + *x = DecryptV2Request_Request{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecryptV2Request_Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecryptV2Request_Request) ProtoMessage() {} + +func (x *DecryptV2Request_Request) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecryptV2Request_Request.ProtoReflect.Descriptor instead. +func (*DecryptV2Request_Request) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *DecryptV2Request_Request) GetPayload() *message_contents.Ciphertext { + if x != nil { + return x.Payload + } + return nil +} + +func (x *DecryptV2Request_Request) GetHeaderBytes() []byte { + if x != nil { + return x.HeaderBytes + } + return nil +} + +func (x *DecryptV2Request_Request) GetContentTopic() string { + if x != nil { + return x.ContentTopic + } + return "" +} + +// A single encryption request +type EncryptV1Request_Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Recipient *message_contents.PublicKeyBundle `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + HeaderBytes []byte `protobuf:"bytes,3,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` +} + +func (x *EncryptV1Request_Request) Reset() { + *x = EncryptV1Request_Request{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncryptV1Request_Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncryptV1Request_Request) ProtoMessage() {} + +func (x *EncryptV1Request_Request) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EncryptV1Request_Request.ProtoReflect.Descriptor instead. +func (*EncryptV1Request_Request) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *EncryptV1Request_Request) GetRecipient() *message_contents.PublicKeyBundle { + if x != nil { + return x.Recipient + } + return nil +} + +func (x *EncryptV1Request_Request) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *EncryptV1Request_Request) GetHeaderBytes() []byte { + if x != nil { + return x.HeaderBytes + } + return nil +} + +// A single encryption response +type EncryptResponse_Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *EncryptResponse_Response_Result + // *EncryptResponse_Response_Error + Response isEncryptResponse_Response_Response `protobuf_oneof:"response"` +} + +func (x *EncryptResponse_Response) Reset() { + *x = EncryptResponse_Response{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncryptResponse_Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncryptResponse_Response) ProtoMessage() {} + +func (x *EncryptResponse_Response) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EncryptResponse_Response.ProtoReflect.Descriptor instead. +func (*EncryptResponse_Response) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{5, 0} +} + +func (m *EncryptResponse_Response) GetResponse() isEncryptResponse_Response_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *EncryptResponse_Response) GetResult() *EncryptResponse_Response_Success { + if x, ok := x.GetResponse().(*EncryptResponse_Response_Result); ok { + return x.Result + } + return nil +} + +func (x *EncryptResponse_Response) GetError() *KeystoreError { + if x, ok := x.GetResponse().(*EncryptResponse_Response_Error); ok { + return x.Error + } + return nil +} + +type isEncryptResponse_Response_Response interface { + isEncryptResponse_Response_Response() +} + +type EncryptResponse_Response_Result struct { + Result *EncryptResponse_Response_Success `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +} + +type EncryptResponse_Response_Error struct { + Error *KeystoreError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*EncryptResponse_Response_Result) isEncryptResponse_Response_Response() {} + +func (*EncryptResponse_Response_Error) isEncryptResponse_Response_Response() {} + +// Wrapper object for success response +type EncryptResponse_Response_Success struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Encrypted *message_contents.Ciphertext `protobuf:"bytes,1,opt,name=encrypted,proto3" json:"encrypted,omitempty"` +} + +func (x *EncryptResponse_Response_Success) Reset() { + *x = EncryptResponse_Response_Success{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncryptResponse_Response_Success) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncryptResponse_Response_Success) ProtoMessage() {} + +func (x *EncryptResponse_Response_Success) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EncryptResponse_Response_Success.ProtoReflect.Descriptor instead. +func (*EncryptResponse_Response_Success) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{5, 0, 0} +} + +func (x *EncryptResponse_Response_Success) GetEncrypted() *message_contents.Ciphertext { + if x != nil { + return x.Encrypted + } + return nil +} + +// A single encryption request +type EncryptV2Request_Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + HeaderBytes []byte `protobuf:"bytes,2,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` + ContentTopic string `protobuf:"bytes,3,opt,name=content_topic,json=contentTopic,proto3" json:"content_topic,omitempty"` +} + +func (x *EncryptV2Request_Request) Reset() { + *x = EncryptV2Request_Request{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncryptV2Request_Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncryptV2Request_Request) ProtoMessage() {} + +func (x *EncryptV2Request_Request) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EncryptV2Request_Request.ProtoReflect.Descriptor instead. +func (*EncryptV2Request_Request) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *EncryptV2Request_Request) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *EncryptV2Request_Request) GetHeaderBytes() []byte { + if x != nil { + return x.HeaderBytes + } + return nil +} + +func (x *EncryptV2Request_Request) GetContentTopic() string { + if x != nil { + return x.ContentTopic + } + return "" +} + +// Request type +type SelfEncryptRequest_Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *SelfEncryptRequest_Request) Reset() { + *x = SelfEncryptRequest_Request{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SelfEncryptRequest_Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SelfEncryptRequest_Request) ProtoMessage() {} + +func (x *SelfEncryptRequest_Request) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[37] + 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 SelfEncryptRequest_Request.ProtoReflect.Descriptor instead. +func (*SelfEncryptRequest_Request) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *SelfEncryptRequest_Request) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// Response type +type SelfEncryptResponse_Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *SelfEncryptResponse_Response_Result + // *SelfEncryptResponse_Response_Error + Response isSelfEncryptResponse_Response_Response `protobuf_oneof:"response"` +} + +func (x *SelfEncryptResponse_Response) Reset() { + *x = SelfEncryptResponse_Response{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SelfEncryptResponse_Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SelfEncryptResponse_Response) ProtoMessage() {} + +func (x *SelfEncryptResponse_Response) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[38] + 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 SelfEncryptResponse_Response.ProtoReflect.Descriptor instead. +func (*SelfEncryptResponse_Response) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{8, 0} +} + +func (m *SelfEncryptResponse_Response) GetResponse() isSelfEncryptResponse_Response_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *SelfEncryptResponse_Response) GetResult() *SelfEncryptResponse_Response_Success { + if x, ok := x.GetResponse().(*SelfEncryptResponse_Response_Result); ok { + return x.Result + } + return nil +} + +func (x *SelfEncryptResponse_Response) GetError() *KeystoreError { + if x, ok := x.GetResponse().(*SelfEncryptResponse_Response_Error); ok { + return x.Error + } + return nil +} + +type isSelfEncryptResponse_Response_Response interface { + isSelfEncryptResponse_Response_Response() +} + +type SelfEncryptResponse_Response_Result struct { + Result *SelfEncryptResponse_Response_Success `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +} + +type SelfEncryptResponse_Response_Error struct { + Error *KeystoreError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*SelfEncryptResponse_Response_Result) isSelfEncryptResponse_Response_Response() {} + +func (*SelfEncryptResponse_Response_Error) isSelfEncryptResponse_Response_Response() {} + +// Success response +type SelfEncryptResponse_Response_Success struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Encrypted []byte `protobuf:"bytes,1,opt,name=encrypted,proto3" json:"encrypted,omitempty"` +} + +func (x *SelfEncryptResponse_Response_Success) Reset() { + *x = SelfEncryptResponse_Response_Success{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SelfEncryptResponse_Response_Success) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SelfEncryptResponse_Response_Success) ProtoMessage() {} + +func (x *SelfEncryptResponse_Response_Success) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[39] + 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 SelfEncryptResponse_Response_Success.ProtoReflect.Descriptor instead. +func (*SelfEncryptResponse_Response_Success) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{8, 0, 0} +} + +func (x *SelfEncryptResponse_Response_Success) GetEncrypted() []byte { + if x != nil { + return x.Encrypted + } + return nil +} + +// Request type +type SelfDecryptRequest_Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *SelfDecryptRequest_Request) Reset() { + *x = SelfDecryptRequest_Request{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SelfDecryptRequest_Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SelfDecryptRequest_Request) ProtoMessage() {} + +func (x *SelfDecryptRequest_Request) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[40] + 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 SelfDecryptRequest_Request.ProtoReflect.Descriptor instead. +func (*SelfDecryptRequest_Request) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{9, 0} +} + +func (x *SelfDecryptRequest_Request) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// Mirrors xmtp.envelope schema +type SaveInvitesRequest_Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ContentTopic string `protobuf:"bytes,1,opt,name=content_topic,json=contentTopic,proto3" json:"content_topic,omitempty"` + TimestampNs uint64 `protobuf:"varint,2,opt,name=timestamp_ns,json=timestampNs,proto3" json:"timestamp_ns,omitempty"` + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *SaveInvitesRequest_Request) Reset() { + *x = SaveInvitesRequest_Request{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveInvitesRequest_Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveInvitesRequest_Request) ProtoMessage() {} + +func (x *SaveInvitesRequest_Request) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[41] + 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 SaveInvitesRequest_Request.ProtoReflect.Descriptor instead. +func (*SaveInvitesRequest_Request) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{13, 0} +} + +func (x *SaveInvitesRequest_Request) GetContentTopic() string { + if x != nil { + return x.ContentTopic + } + return "" +} + +func (x *SaveInvitesRequest_Request) GetTimestampNs() uint64 { + if x != nil { + return x.TimestampNs + } + return 0 +} + +func (x *SaveInvitesRequest_Request) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// A single response +type SaveInvitesResponse_Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *SaveInvitesResponse_Response_Result + // *SaveInvitesResponse_Response_Error + Response isSaveInvitesResponse_Response_Response `protobuf_oneof:"response"` +} + +func (x *SaveInvitesResponse_Response) Reset() { + *x = SaveInvitesResponse_Response{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveInvitesResponse_Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveInvitesResponse_Response) ProtoMessage() {} + +func (x *SaveInvitesResponse_Response) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[42] + 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 SaveInvitesResponse_Response.ProtoReflect.Descriptor instead. +func (*SaveInvitesResponse_Response) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{14, 0} +} + +func (m *SaveInvitesResponse_Response) GetResponse() isSaveInvitesResponse_Response_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *SaveInvitesResponse_Response) GetResult() *SaveInvitesResponse_Response_Success { + if x, ok := x.GetResponse().(*SaveInvitesResponse_Response_Result); ok { + return x.Result + } + return nil +} + +func (x *SaveInvitesResponse_Response) GetError() *KeystoreError { + if x, ok := x.GetResponse().(*SaveInvitesResponse_Response_Error); ok { + return x.Error + } + return nil +} + +type isSaveInvitesResponse_Response_Response interface { + isSaveInvitesResponse_Response_Response() +} + +type SaveInvitesResponse_Response_Result struct { + Result *SaveInvitesResponse_Response_Success `protobuf:"bytes,1,opt,name=result,proto3,oneof"` +} + +type SaveInvitesResponse_Response_Error struct { + Error *KeystoreError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*SaveInvitesResponse_Response_Result) isSaveInvitesResponse_Response_Response() {} + +func (*SaveInvitesResponse_Response_Error) isSaveInvitesResponse_Response_Response() {} + +// Wrapper object for success response +type SaveInvitesResponse_Response_Success struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Conversation *message_contents.ConversationReference `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation,omitempty"` +} + +func (x *SaveInvitesResponse_Response_Success) Reset() { + *x = SaveInvitesResponse_Response_Success{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveInvitesResponse_Response_Success) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveInvitesResponse_Response_Success) ProtoMessage() {} + +func (x *SaveInvitesResponse_Response_Success) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[43] + 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 SaveInvitesResponse_Response_Success.ProtoReflect.Descriptor instead. +func (*SaveInvitesResponse_Response_Success) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{14, 0, 0} +} + +func (x *SaveInvitesResponse_Response_Success) GetConversation() *message_contents.ConversationReference { + if x != nil { + return x.Conversation + } + return nil +} + +// TopicData wraps the invitation and the timestamp it was created +type TopicMap_TopicData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CreatedNs uint64 `protobuf:"varint,1,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` + PeerAddress string `protobuf:"bytes,2,opt,name=peer_address,json=peerAddress,proto3" json:"peer_address,omitempty"` + Invitation *message_contents.InvitationV1 `protobuf:"bytes,3,opt,name=invitation,proto3" json:"invitation,omitempty"` +} + +func (x *TopicMap_TopicData) Reset() { + *x = TopicMap_TopicData{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TopicMap_TopicData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TopicMap_TopicData) ProtoMessage() {} + +func (x *TopicMap_TopicData) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[44] + 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 TopicMap_TopicData.ProtoReflect.Descriptor instead. +func (*TopicMap_TopicData) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{28, 0} +} + +func (x *TopicMap_TopicData) GetCreatedNs() uint64 { + if x != nil { + return x.CreatedNs + } + return 0 +} + +func (x *TopicMap_TopicData) GetPeerAddress() string { + if x != nil { + return x.PeerAddress + } + return "" +} + +func (x *TopicMap_TopicData) GetInvitation() *message_contents.InvitationV1 { + if x != nil { + return x.Invitation + } + return nil +} + +var File_keystore_api_v1_keystore_proto protoreflect.FileDescriptor + +var file_keystore_api_v1_keystore_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x14, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, + 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x69, 0x6e, 0x76, 0x69, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x22, 0xac, 0x02, 0x0a, 0x10, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x56, 0x31, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x56, 0x31, 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, 0xcb, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3b, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, + 0x65, 0x78, 0x74, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x43, 0x0a, 0x09, + 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x4b, 0x65, 0x79, + 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x22, 0xb0, 0x02, 0x0a, 0x0f, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 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, 0xce, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x50, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x36, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 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, + 0x27, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x64, + 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xef, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x08, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x56, 0x32, 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, 0x8e, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3b, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, + 0x72, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x21, + 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x70, + 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x22, 0xed, 0x01, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x56, 0x31, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x08, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x56, 0x31, 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, 0x8c, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 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, 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, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xd3, 0x02, 0x0a, 0x0f, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x09, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 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, 0xf1, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 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, 0x4a, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, + 0x3f, 0x0a, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, + 0x72, 0x74, 0x65, 0x78, 0x74, 0x52, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcb, 0x01, 0x0a, + 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x4a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x56, 0x32, 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, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x22, 0x87, 0x01, 0x0a, 0x12, 0x53, + 0x65, 0x6c, 0x66, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 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, 0x65, 0x6c, 0x66, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 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, + 0x23, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xbc, 0x02, 0x0a, 0x13, 0x53, 0x65, 0x6c, 0x66, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 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, 0x65, 0x6c, 0x66, 0x45, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 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, 0xd2, + 0x01, 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, 0x65, 0x6c, 0x66, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 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, 0x27, + 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x6c, 0x66, 0x44, 0x65, 0x63, 0x72, + 0x79, 0x70, 0x74, 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, 0x65, 0x6c, 0x66, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 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, 0x23, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x4e, 0x0a, + 0x2c, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, + 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0xc7, 0x01, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 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, 0x4a, 0x0a, 0x09, + 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 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, 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, 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, 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, 0x70, 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, 0x12, 0x19, 0x0a, 0x15, 0x4a, 0x4f, 0x42, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, 0x5f, 0x50, 0x50, 0x50, + 0x50, 0x10, 0x03, 0x42, 0xde, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x42, 0x0d, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, + 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, + 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x58, 0x4b, 0x58, 0xaa, 0x02, + 0x13, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x41, 0x70, + 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4b, 0x65, 0x79, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x58, 0x6d, 0x74, + 0x70, 0x5c, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x58, + 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x41, 0x70, 0x69, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_keystore_api_v1_keystore_proto_rawDescOnce sync.Once + file_keystore_api_v1_keystore_proto_rawDescData = file_keystore_api_v1_keystore_proto_rawDesc +) + +func file_keystore_api_v1_keystore_proto_rawDescGZIP() []byte { + file_keystore_api_v1_keystore_proto_rawDescOnce.Do(func() { + file_keystore_api_v1_keystore_proto_rawDescData = protoimpl.X.CompressGZIP(file_keystore_api_v1_keystore_proto_rawDescData) + }) + return file_keystore_api_v1_keystore_proto_rawDescData +} + +var file_keystore_api_v1_keystore_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_keystore_api_v1_keystore_proto_msgTypes = make([]protoimpl.MessageInfo, 46) +var file_keystore_api_v1_keystore_proto_goTypes = []interface{}{ + (ErrorCode)(0), // 0: xmtp.keystore_api.v1.ErrorCode + (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 + (*SelfEncryptRequest)(nil), // 10: xmtp.keystore_api.v1.SelfEncryptRequest + (*SelfEncryptResponse)(nil), // 11: xmtp.keystore_api.v1.SelfEncryptResponse + (*SelfDecryptRequest)(nil), // 12: xmtp.keystore_api.v1.SelfDecryptRequest + (*GetPrivatePreferencesTopicIdentifierResponse)(nil), // 13: xmtp.keystore_api.v1.GetPrivatePreferencesTopicIdentifierResponse + (*CreateInviteRequest)(nil), // 14: xmtp.keystore_api.v1.CreateInviteRequest + (*CreateInviteResponse)(nil), // 15: xmtp.keystore_api.v1.CreateInviteResponse + (*SaveInvitesRequest)(nil), // 16: xmtp.keystore_api.v1.SaveInvitesRequest + (*SaveInvitesResponse)(nil), // 17: xmtp.keystore_api.v1.SaveInvitesResponse + (*CreateAuthTokenRequest)(nil), // 18: xmtp.keystore_api.v1.CreateAuthTokenRequest + (*SaveV1ConversationsRequest)(nil), // 19: xmtp.keystore_api.v1.SaveV1ConversationsRequest + (*SaveV1ConversationsResponse)(nil), // 20: xmtp.keystore_api.v1.SaveV1ConversationsResponse + (*GetConversationsResponse)(nil), // 21: xmtp.keystore_api.v1.GetConversationsResponse + (*GetKeystoreStatusRequest)(nil), // 22: xmtp.keystore_api.v1.GetKeystoreStatusRequest + (*GetKeystoreStatusResponse)(nil), // 23: xmtp.keystore_api.v1.GetKeystoreStatusResponse + (*InitKeystoreRequest)(nil), // 24: xmtp.keystore_api.v1.InitKeystoreRequest + (*InitKeystoreResponse)(nil), // 25: xmtp.keystore_api.v1.InitKeystoreResponse + (*SignDigestRequest)(nil), // 26: xmtp.keystore_api.v1.SignDigestRequest + (*GetRefreshJobRequest)(nil), // 27: xmtp.keystore_api.v1.GetRefreshJobRequest + (*GetRefreshJobResponse)(nil), // 28: xmtp.keystore_api.v1.GetRefreshJobResponse + (*SetRefeshJobRequest)(nil), // 29: xmtp.keystore_api.v1.SetRefeshJobRequest + (*SetRefreshJobResponse)(nil), // 30: xmtp.keystore_api.v1.SetRefreshJobResponse + (*TopicMap)(nil), // 31: xmtp.keystore_api.v1.TopicMap + (*DecryptV1Request_Request)(nil), // 32: xmtp.keystore_api.v1.DecryptV1Request.Request + (*DecryptResponse_Response)(nil), // 33: xmtp.keystore_api.v1.DecryptResponse.Response + (*DecryptResponse_Response_Success)(nil), // 34: xmtp.keystore_api.v1.DecryptResponse.Response.Success + (*DecryptV2Request_Request)(nil), // 35: xmtp.keystore_api.v1.DecryptV2Request.Request + (*EncryptV1Request_Request)(nil), // 36: xmtp.keystore_api.v1.EncryptV1Request.Request + (*EncryptResponse_Response)(nil), // 37: xmtp.keystore_api.v1.EncryptResponse.Response + (*EncryptResponse_Response_Success)(nil), // 38: xmtp.keystore_api.v1.EncryptResponse.Response.Success + (*EncryptV2Request_Request)(nil), // 39: xmtp.keystore_api.v1.EncryptV2Request.Request + (*SelfEncryptRequest_Request)(nil), // 40: xmtp.keystore_api.v1.SelfEncryptRequest.Request + (*SelfEncryptResponse_Response)(nil), // 41: xmtp.keystore_api.v1.SelfEncryptResponse.Response + (*SelfEncryptResponse_Response_Success)(nil), // 42: xmtp.keystore_api.v1.SelfEncryptResponse.Response.Success + (*SelfDecryptRequest_Request)(nil), // 43: xmtp.keystore_api.v1.SelfDecryptRequest.Request + (*SaveInvitesRequest_Request)(nil), // 44: xmtp.keystore_api.v1.SaveInvitesRequest.Request + (*SaveInvitesResponse_Response)(nil), // 45: xmtp.keystore_api.v1.SaveInvitesResponse.Response + (*SaveInvitesResponse_Response_Success)(nil), // 46: xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success + (*TopicMap_TopicData)(nil), // 47: xmtp.keystore_api.v1.TopicMap.TopicData + nil, // 48: xmtp.keystore_api.v1.TopicMap.TopicsEntry + (*message_contents.InvitationV1_Context)(nil), // 49: xmtp.message_contents.InvitationV1.Context + (*message_contents.SignedPublicKeyBundle)(nil), // 50: xmtp.message_contents.SignedPublicKeyBundle + (*message_contents.ConversationReference)(nil), // 51: xmtp.message_contents.ConversationReference + (*message_contents.PrivateKeyBundleV1)(nil), // 52: xmtp.message_contents.PrivateKeyBundleV1 + (*message_contents.Ciphertext)(nil), // 53: xmtp.message_contents.Ciphertext + (*message_contents.PublicKeyBundle)(nil), // 54: xmtp.message_contents.PublicKeyBundle + (*message_contents.InvitationV1)(nil), // 55: 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 + 32, // 1: xmtp.keystore_api.v1.DecryptV1Request.requests:type_name -> xmtp.keystore_api.v1.DecryptV1Request.Request + 33, // 2: xmtp.keystore_api.v1.DecryptResponse.responses:type_name -> xmtp.keystore_api.v1.DecryptResponse.Response + 35, // 3: xmtp.keystore_api.v1.DecryptV2Request.requests:type_name -> xmtp.keystore_api.v1.DecryptV2Request.Request + 36, // 4: xmtp.keystore_api.v1.EncryptV1Request.requests:type_name -> xmtp.keystore_api.v1.EncryptV1Request.Request + 37, // 5: xmtp.keystore_api.v1.EncryptResponse.responses:type_name -> xmtp.keystore_api.v1.EncryptResponse.Response + 39, // 6: xmtp.keystore_api.v1.EncryptV2Request.requests:type_name -> xmtp.keystore_api.v1.EncryptV2Request.Request + 40, // 7: xmtp.keystore_api.v1.SelfEncryptRequest.requests:type_name -> xmtp.keystore_api.v1.SelfEncryptRequest.Request + 41, // 8: xmtp.keystore_api.v1.SelfEncryptResponse.responses:type_name -> xmtp.keystore_api.v1.SelfEncryptResponse.Response + 43, // 9: xmtp.keystore_api.v1.SelfDecryptRequest.requests:type_name -> xmtp.keystore_api.v1.SelfDecryptRequest.Request + 49, // 10: xmtp.keystore_api.v1.CreateInviteRequest.context:type_name -> xmtp.message_contents.InvitationV1.Context + 50, // 11: xmtp.keystore_api.v1.CreateInviteRequest.recipient:type_name -> xmtp.message_contents.SignedPublicKeyBundle + 51, // 12: xmtp.keystore_api.v1.CreateInviteResponse.conversation:type_name -> xmtp.message_contents.ConversationReference + 44, // 13: xmtp.keystore_api.v1.SaveInvitesRequest.requests:type_name -> xmtp.keystore_api.v1.SaveInvitesRequest.Request + 45, // 14: xmtp.keystore_api.v1.SaveInvitesResponse.responses:type_name -> xmtp.keystore_api.v1.SaveInvitesResponse.Response + 51, // 15: xmtp.keystore_api.v1.SaveV1ConversationsRequest.conversations:type_name -> xmtp.message_contents.ConversationReference + 51, // 16: xmtp.keystore_api.v1.GetConversationsResponse.conversations:type_name -> xmtp.message_contents.ConversationReference + 2, // 17: xmtp.keystore_api.v1.GetKeystoreStatusResponse.status:type_name -> xmtp.keystore_api.v1.GetKeystoreStatusResponse.KeystoreStatus + 52, // 18: xmtp.keystore_api.v1.InitKeystoreRequest.v1:type_name -> xmtp.message_contents.PrivateKeyBundleV1 + 3, // 19: xmtp.keystore_api.v1.InitKeystoreResponse.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 1, // 20: xmtp.keystore_api.v1.GetRefreshJobRequest.job_type:type_name -> xmtp.keystore_api.v1.JobType + 1, // 21: xmtp.keystore_api.v1.SetRefeshJobRequest.job_type:type_name -> xmtp.keystore_api.v1.JobType + 48, // 22: xmtp.keystore_api.v1.TopicMap.topics:type_name -> xmtp.keystore_api.v1.TopicMap.TopicsEntry + 53, // 23: xmtp.keystore_api.v1.DecryptV1Request.Request.payload:type_name -> xmtp.message_contents.Ciphertext + 54, // 24: xmtp.keystore_api.v1.DecryptV1Request.Request.peer_keys:type_name -> xmtp.message_contents.PublicKeyBundle + 34, // 25: xmtp.keystore_api.v1.DecryptResponse.Response.result:type_name -> xmtp.keystore_api.v1.DecryptResponse.Response.Success + 3, // 26: xmtp.keystore_api.v1.DecryptResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 53, // 27: xmtp.keystore_api.v1.DecryptV2Request.Request.payload:type_name -> xmtp.message_contents.Ciphertext + 54, // 28: xmtp.keystore_api.v1.EncryptV1Request.Request.recipient:type_name -> xmtp.message_contents.PublicKeyBundle + 38, // 29: xmtp.keystore_api.v1.EncryptResponse.Response.result:type_name -> xmtp.keystore_api.v1.EncryptResponse.Response.Success + 3, // 30: xmtp.keystore_api.v1.EncryptResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 53, // 31: xmtp.keystore_api.v1.EncryptResponse.Response.Success.encrypted:type_name -> xmtp.message_contents.Ciphertext + 42, // 32: xmtp.keystore_api.v1.SelfEncryptResponse.Response.result:type_name -> xmtp.keystore_api.v1.SelfEncryptResponse.Response.Success + 3, // 33: xmtp.keystore_api.v1.SelfEncryptResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 46, // 34: xmtp.keystore_api.v1.SaveInvitesResponse.Response.result:type_name -> xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success + 3, // 35: xmtp.keystore_api.v1.SaveInvitesResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 51, // 36: xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success.conversation:type_name -> xmtp.message_contents.ConversationReference + 55, // 37: xmtp.keystore_api.v1.TopicMap.TopicData.invitation:type_name -> xmtp.message_contents.InvitationV1 + 47, // 38: xmtp.keystore_api.v1.TopicMap.TopicsEntry.value:type_name -> xmtp.keystore_api.v1.TopicMap.TopicData + 39, // [39:39] is the sub-list for method output_type + 39, // [39:39] is the sub-list for method input_type + 39, // [39:39] is the sub-list for extension type_name + 39, // [39:39] is the sub-list for extension extendee + 0, // [0:39] is the sub-list for field type_name +} + +func init() { file_keystore_api_v1_keystore_proto_init() } +func file_keystore_api_v1_keystore_proto_init() { + if File_keystore_api_v1_keystore_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_keystore_api_v1_keystore_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeystoreError); 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[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DecryptV1Request); 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[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DecryptResponse); 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[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DecryptV2Request); 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[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EncryptV1Request); 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[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EncryptResponse); 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[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EncryptV2Request); 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[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SelfEncryptRequest); 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[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SelfEncryptResponse); 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[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SelfDecryptRequest); 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[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPrivatePreferencesTopicIdentifierResponse); 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[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateInviteRequest); 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[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateInviteResponse); 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[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveInvitesRequest); 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[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveInvitesResponse); 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[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateAuthTokenRequest); 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[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveV1ConversationsRequest); 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[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveV1ConversationsResponse); 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[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetConversationsResponse); 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[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetKeystoreStatusRequest); 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[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetKeystoreStatusResponse); 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[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitKeystoreRequest); 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[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitKeystoreResponse); 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[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignDigestRequest); 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[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRefreshJobRequest); 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[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRefreshJobResponse); 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[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetRefeshJobRequest); 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[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetRefreshJobResponse); 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[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TopicMap); 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[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DecryptV1Request_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[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DecryptResponse_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[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DecryptResponse_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[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DecryptV2Request_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[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EncryptV1Request_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.(*EncryptResponse_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.(*EncryptResponse_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.(*EncryptV2Request_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[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SelfEncryptRequest_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[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SelfEncryptResponse_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[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SelfEncryptResponse_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[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SelfDecryptRequest_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[41].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[42].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[43].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[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TopicMap_TopicData); 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[15].OneofWrappers = []interface{}{} + file_keystore_api_v1_keystore_proto_msgTypes[21].OneofWrappers = []interface{}{ + (*InitKeystoreRequest_V1)(nil), + } + file_keystore_api_v1_keystore_proto_msgTypes[23].OneofWrappers = []interface{}{ + (*SignDigestRequest_IdentityKey)(nil), + (*SignDigestRequest_PrekeyIndex)(nil), + } + file_keystore_api_v1_keystore_proto_msgTypes[30].OneofWrappers = []interface{}{ + (*DecryptResponse_Response_Result)(nil), + (*DecryptResponse_Response_Error)(nil), + } + file_keystore_api_v1_keystore_proto_msgTypes[34].OneofWrappers = []interface{}{ + (*EncryptResponse_Response_Result)(nil), + (*EncryptResponse_Response_Error)(nil), + } + file_keystore_api_v1_keystore_proto_msgTypes[38].OneofWrappers = []interface{}{ + (*SelfEncryptResponse_Response_Result)(nil), + (*SelfEncryptResponse_Response_Error)(nil), + } + file_keystore_api_v1_keystore_proto_msgTypes[42].OneofWrappers = []interface{}{ + (*SaveInvitesResponse_Response_Result)(nil), + (*SaveInvitesResponse_Response_Error)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_keystore_api_v1_keystore_proto_rawDesc, + NumEnums: 3, + NumMessages: 46, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_keystore_api_v1_keystore_proto_goTypes, + DependencyIndexes: file_keystore_api_v1_keystore_proto_depIdxs, + EnumInfos: file_keystore_api_v1_keystore_proto_enumTypes, + MessageInfos: file_keystore_api_v1_keystore_proto_msgTypes, + }.Build() + File_keystore_api_v1_keystore_proto = out.File + file_keystore_api_v1_keystore_proto_rawDesc = nil + file_keystore_api_v1_keystore_proto_goTypes = nil + file_keystore_api_v1_keystore_proto_depIdxs = nil +} diff --git a/pkg/proto/message_api/v1/authn.pb.go b/pkg/proto/message_api/v1/authn.pb.go new file mode 100644 index 00000000..f1fa710c --- /dev/null +++ b/pkg/proto/message_api/v1/authn.pb.go @@ -0,0 +1,278 @@ +// Client authentication protocol + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_api/v1/authn.proto + +package message_apiv1 + +import ( + message_contents "github.com/xmtp/xmtp-node-go/pkg/proto/message_contents" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Token is used by clients to prove to the nodes +// that they are serving a specific wallet. +type Token struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // identity key signed by a wallet + IdentityKey *message_contents.PublicKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` + // encoded bytes of AuthData + AuthDataBytes []byte `protobuf:"bytes,2,opt,name=auth_data_bytes,json=authDataBytes,proto3" json:"auth_data_bytes,omitempty"` + // identity key signature of AuthData bytes + AuthDataSignature *message_contents.Signature `protobuf:"bytes,3,opt,name=auth_data_signature,json=authDataSignature,proto3" json:"auth_data_signature,omitempty"` +} + +func (x *Token) Reset() { + *x = Token{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_authn_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Token) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Token) ProtoMessage() {} + +func (x *Token) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_authn_proto_msgTypes[0] + 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 Token.ProtoReflect.Descriptor instead. +func (*Token) Descriptor() ([]byte, []int) { + return file_message_api_v1_authn_proto_rawDescGZIP(), []int{0} +} + +func (x *Token) GetIdentityKey() *message_contents.PublicKey { + if x != nil { + return x.IdentityKey + } + return nil +} + +func (x *Token) GetAuthDataBytes() []byte { + if x != nil { + return x.AuthDataBytes + } + return nil +} + +func (x *Token) GetAuthDataSignature() *message_contents.Signature { + if x != nil { + return x.AuthDataSignature + } + return nil +} + +// AuthData carries token parameters that are authenticated +// by the identity key signature. +// It is embedded in the Token structure as bytes +// so that the bytes don't need to be reconstructed +// to verify the token signature. +type AuthData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // address of the wallet + WalletAddr string `protobuf:"bytes,1,opt,name=wallet_addr,json=walletAddr,proto3" json:"wallet_addr,omitempty"` + // time when the token was generated/signed + CreatedNs uint64 `protobuf:"varint,2,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` +} + +func (x *AuthData) Reset() { + *x = AuthData{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_authn_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthData) ProtoMessage() {} + +func (x *AuthData) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_authn_proto_msgTypes[1] + 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 AuthData.ProtoReflect.Descriptor instead. +func (*AuthData) Descriptor() ([]byte, []int) { + return file_message_api_v1_authn_proto_rawDescGZIP(), []int{1} +} + +func (x *AuthData) GetWalletAddr() string { + if x != nil { + return x.WalletAddr + } + return "" +} + +func (x *AuthData) GetCreatedNs() uint64 { + if x != nil { + return x.CreatedNs + } + return 0 +} + +var File_message_api_v1_authn_proto protoreflect.FileDescriptor + +var file_message_api_v1_authn_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x1a, 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc6, 0x01, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x43, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, + 0x61, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x50, 0x0a, + 0x13, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 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, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x11, 0x61, 0x75, + 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, + 0x4a, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1d, 0x0a, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x73, 0x42, 0xd4, 0x01, 0x0a, 0x17, + 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x41, 0x75, 0x74, 0x68, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, + 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, + 0xaa, 0x02, 0x12, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, + 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x58, 0x6d, 0x74, + 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x58, 0x6d, + 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x70, 0x69, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_api_v1_authn_proto_rawDescOnce sync.Once + file_message_api_v1_authn_proto_rawDescData = file_message_api_v1_authn_proto_rawDesc +) + +func file_message_api_v1_authn_proto_rawDescGZIP() []byte { + file_message_api_v1_authn_proto_rawDescOnce.Do(func() { + file_message_api_v1_authn_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_api_v1_authn_proto_rawDescData) + }) + return file_message_api_v1_authn_proto_rawDescData +} + +var file_message_api_v1_authn_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_message_api_v1_authn_proto_goTypes = []interface{}{ + (*Token)(nil), // 0: xmtp.message_api.v1.Token + (*AuthData)(nil), // 1: xmtp.message_api.v1.AuthData + (*message_contents.PublicKey)(nil), // 2: xmtp.message_contents.PublicKey + (*message_contents.Signature)(nil), // 3: xmtp.message_contents.Signature +} +var file_message_api_v1_authn_proto_depIdxs = []int32{ + 2, // 0: xmtp.message_api.v1.Token.identity_key:type_name -> xmtp.message_contents.PublicKey + 3, // 1: xmtp.message_api.v1.Token.auth_data_signature:type_name -> xmtp.message_contents.Signature + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_message_api_v1_authn_proto_init() } +func file_message_api_v1_authn_proto_init() { + if File_message_api_v1_authn_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_message_api_v1_authn_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Token); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_api_v1_authn_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AuthData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_api_v1_authn_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_api_v1_authn_proto_goTypes, + DependencyIndexes: file_message_api_v1_authn_proto_depIdxs, + MessageInfos: file_message_api_v1_authn_proto_msgTypes, + }.Build() + File_message_api_v1_authn_proto = out.File + file_message_api_v1_authn_proto_rawDesc = nil + file_message_api_v1_authn_proto_goTypes = nil + file_message_api_v1_authn_proto_depIdxs = nil +} diff --git a/pkg/proto/message_api/v1/message_api.pb.go b/pkg/proto/message_api/v1/message_api.pb.go new file mode 100644 index 00000000..d76ffb9c --- /dev/null +++ b/pkg/proto/message_api/v1/message_api.pb.go @@ -0,0 +1,1122 @@ +// Message API + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_api/v1/message_api.proto + +package message_apiv1 + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Sort direction +type SortDirection int32 + +const ( + SortDirection_SORT_DIRECTION_UNSPECIFIED SortDirection = 0 + SortDirection_SORT_DIRECTION_ASCENDING SortDirection = 1 + SortDirection_SORT_DIRECTION_DESCENDING SortDirection = 2 +) + +// Enum value maps for SortDirection. +var ( + SortDirection_name = map[int32]string{ + 0: "SORT_DIRECTION_UNSPECIFIED", + 1: "SORT_DIRECTION_ASCENDING", + 2: "SORT_DIRECTION_DESCENDING", + } + SortDirection_value = map[string]int32{ + "SORT_DIRECTION_UNSPECIFIED": 0, + "SORT_DIRECTION_ASCENDING": 1, + "SORT_DIRECTION_DESCENDING": 2, + } +) + +func (x SortDirection) Enum() *SortDirection { + p := new(SortDirection) + *p = x + return p +} + +func (x SortDirection) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SortDirection) Descriptor() protoreflect.EnumDescriptor { + return file_message_api_v1_message_api_proto_enumTypes[0].Descriptor() +} + +func (SortDirection) Type() protoreflect.EnumType { + return &file_message_api_v1_message_api_proto_enumTypes[0] +} + +func (x SortDirection) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SortDirection.Descriptor instead. +func (SortDirection) EnumDescriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{0} +} + +// This is based off of the go-waku Index type, but with the +// receiverTime and pubsubTopic removed for simplicity. +// Both removed fields are optional +type IndexCursor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"` + SenderTimeNs uint64 `protobuf:"varint,2,opt,name=sender_time_ns,json=senderTimeNs,proto3" json:"sender_time_ns,omitempty"` +} + +func (x *IndexCursor) Reset() { + *x = IndexCursor{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_message_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IndexCursor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IndexCursor) ProtoMessage() {} + +func (x *IndexCursor) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_message_api_proto_msgTypes[0] + 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 IndexCursor.ProtoReflect.Descriptor instead. +func (*IndexCursor) Descriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{0} +} + +func (x *IndexCursor) GetDigest() []byte { + if x != nil { + return x.Digest + } + return nil +} + +func (x *IndexCursor) GetSenderTimeNs() uint64 { + if x != nil { + return x.SenderTimeNs + } + return 0 +} + +// Wrapper for potentially multiple types of cursor +type Cursor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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 + // + // Types that are assignable to Cursor: + // + // *Cursor_Index + Cursor isCursor_Cursor `protobuf_oneof:"cursor"` +} + +func (x *Cursor) Reset() { + *x = Cursor{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_message_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cursor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cursor) ProtoMessage() {} + +func (x *Cursor) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_message_api_proto_msgTypes[1] + 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 Cursor.ProtoReflect.Descriptor instead. +func (*Cursor) Descriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{1} +} + +func (m *Cursor) GetCursor() isCursor_Cursor { + if m != nil { + return m.Cursor + } + return nil +} + +func (x *Cursor) GetIndex() *IndexCursor { + if x, ok := x.GetCursor().(*Cursor_Index); ok { + return x.Index + } + return nil +} + +type isCursor_Cursor interface { + isCursor_Cursor() +} + +type Cursor_Index struct { + Index *IndexCursor `protobuf:"bytes,1,opt,name=index,proto3,oneof"` +} + +func (*Cursor_Index) isCursor_Cursor() {} + +// This is based off of the go-waku PagingInfo struct, but with the direction +// changed to our SortDirection enum format +type PagingInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Note: this is a uint32, while go-waku's pageSize is a uint64 + Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` + Cursor *Cursor `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"` + Direction SortDirection `protobuf:"varint,3,opt,name=direction,proto3,enum=xmtp.message_api.v1.SortDirection" json:"direction,omitempty"` +} + +func (x *PagingInfo) Reset() { + *x = PagingInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_message_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PagingInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PagingInfo) ProtoMessage() {} + +func (x *PagingInfo) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_message_api_proto_msgTypes[2] + 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 PagingInfo.ProtoReflect.Descriptor instead. +func (*PagingInfo) Descriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{2} +} + +func (x *PagingInfo) GetLimit() uint32 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *PagingInfo) GetCursor() *Cursor { + if x != nil { + return x.Cursor + } + return nil +} + +func (x *PagingInfo) GetDirection() SortDirection { + if x != nil { + return x.Direction + } + return SortDirection_SORT_DIRECTION_UNSPECIFIED +} + +// Envelope encapsulates a message while in transit. +type Envelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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. + ContentTopic string `protobuf:"bytes,1,opt,name=content_topic,json=contentTopic,proto3" json:"content_topic,omitempty"` + // Message creation timestamp + // If the message includes the timestamp as well + // it MUST be equivalent to the timestamp in the envelope. + TimestampNs uint64 `protobuf:"varint,2,opt,name=timestamp_ns,json=timestampNs,proto3" json:"timestamp_ns,omitempty"` + Message []byte `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *Envelope) Reset() { + *x = Envelope{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_message_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Envelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Envelope) ProtoMessage() {} + +func (x *Envelope) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_message_api_proto_msgTypes[3] + 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 Envelope.ProtoReflect.Descriptor instead. +func (*Envelope) Descriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{3} +} + +func (x *Envelope) GetContentTopic() string { + if x != nil { + return x.ContentTopic + } + return "" +} + +func (x *Envelope) GetTimestampNs() uint64 { + if x != nil { + return x.TimestampNs + } + return 0 +} + +func (x *Envelope) GetMessage() []byte { + if x != nil { + return x.Message + } + return nil +} + +// Publish +type PublishRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Envelopes []*Envelope `protobuf:"bytes,1,rep,name=envelopes,proto3" json:"envelopes,omitempty"` +} + +func (x *PublishRequest) Reset() { + *x = PublishRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_message_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublishRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishRequest) ProtoMessage() {} + +func (x *PublishRequest) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_message_api_proto_msgTypes[4] + 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 PublishRequest.ProtoReflect.Descriptor instead. +func (*PublishRequest) Descriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{4} +} + +func (x *PublishRequest) GetEnvelopes() []*Envelope { + if x != nil { + return x.Envelopes + } + return nil +} + +// Empty message as a response for Publish +type PublishResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PublishResponse) Reset() { + *x = PublishResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_message_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublishResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishResponse) ProtoMessage() {} + +func (x *PublishResponse) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_message_api_proto_msgTypes[5] + 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 PublishResponse.ProtoReflect.Descriptor instead. +func (*PublishResponse) Descriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{5} +} + +// Subscribe +type SubscribeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ContentTopics []string `protobuf:"bytes,1,rep,name=content_topics,json=contentTopics,proto3" json:"content_topics,omitempty"` +} + +func (x *SubscribeRequest) Reset() { + *x = SubscribeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_message_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubscribeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscribeRequest) ProtoMessage() {} + +func (x *SubscribeRequest) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_message_api_proto_msgTypes[6] + 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 SubscribeRequest.ProtoReflect.Descriptor instead. +func (*SubscribeRequest) Descriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{6} +} + +func (x *SubscribeRequest) GetContentTopics() []string { + if x != nil { + return x.ContentTopics + } + return nil +} + +// SubscribeAll +type SubscribeAllRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SubscribeAllRequest) Reset() { + *x = SubscribeAllRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_message_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubscribeAllRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscribeAllRequest) ProtoMessage() {} + +func (x *SubscribeAllRequest) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_message_api_proto_msgTypes[7] + 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 SubscribeAllRequest.ProtoReflect.Descriptor instead. +func (*SubscribeAllRequest) Descriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{7} +} + +// Query +type QueryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ContentTopics []string `protobuf:"bytes,1,rep,name=content_topics,json=contentTopics,proto3" json:"content_topics,omitempty"` + StartTimeNs uint64 `protobuf:"varint,2,opt,name=start_time_ns,json=startTimeNs,proto3" json:"start_time_ns,omitempty"` + EndTimeNs uint64 `protobuf:"varint,3,opt,name=end_time_ns,json=endTimeNs,proto3" json:"end_time_ns,omitempty"` + PagingInfo *PagingInfo `protobuf:"bytes,4,opt,name=paging_info,json=pagingInfo,proto3" json:"paging_info,omitempty"` +} + +func (x *QueryRequest) Reset() { + *x = QueryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_message_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRequest) ProtoMessage() {} + +func (x *QueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_message_api_proto_msgTypes[8] + 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 QueryRequest.ProtoReflect.Descriptor instead. +func (*QueryRequest) Descriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{8} +} + +func (x *QueryRequest) GetContentTopics() []string { + if x != nil { + return x.ContentTopics + } + return nil +} + +func (x *QueryRequest) GetStartTimeNs() uint64 { + if x != nil { + return x.StartTimeNs + } + return 0 +} + +func (x *QueryRequest) GetEndTimeNs() uint64 { + if x != nil { + return x.EndTimeNs + } + return 0 +} + +func (x *QueryRequest) GetPagingInfo() *PagingInfo { + if x != nil { + return x.PagingInfo + } + return nil +} + +// The response, containing envelopes, for a query +type QueryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Envelopes []*Envelope `protobuf:"bytes,1,rep,name=envelopes,proto3" json:"envelopes,omitempty"` + PagingInfo *PagingInfo `protobuf:"bytes,2,opt,name=paging_info,json=pagingInfo,proto3" json:"paging_info,omitempty"` +} + +func (x *QueryResponse) Reset() { + *x = QueryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_message_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryResponse) ProtoMessage() {} + +func (x *QueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_message_api_proto_msgTypes[9] + 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 QueryResponse.ProtoReflect.Descriptor instead. +func (*QueryResponse) Descriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryResponse) GetEnvelopes() []*Envelope { + if x != nil { + return x.Envelopes + } + return nil +} + +func (x *QueryResponse) GetPagingInfo() *PagingInfo { + if x != nil { + return x.PagingInfo + } + return nil +} + +// BatchQuery +type BatchQueryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Requests []*QueryRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *BatchQueryRequest) Reset() { + *x = BatchQueryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_message_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchQueryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchQueryRequest) ProtoMessage() {} + +func (x *BatchQueryRequest) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_message_api_proto_msgTypes[10] + 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 BatchQueryRequest.ProtoReflect.Descriptor instead. +func (*BatchQueryRequest) Descriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{10} +} + +func (x *BatchQueryRequest) GetRequests() []*QueryRequest { + if x != nil { + return x.Requests + } + return nil +} + +// Response containing a list of QueryResponse messages +type BatchQueryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*QueryResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *BatchQueryResponse) Reset() { + *x = BatchQueryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_message_api_v1_message_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchQueryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchQueryResponse) ProtoMessage() {} + +func (x *BatchQueryResponse) ProtoReflect() protoreflect.Message { + mi := &file_message_api_v1_message_api_proto_msgTypes[11] + 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 BatchQueryResponse.ProtoReflect.Descriptor instead. +func (*BatchQueryResponse) Descriptor() ([]byte, []int) { + return file_message_api_v1_message_api_proto_rawDescGZIP(), []int{11} +} + +func (x *BatchQueryResponse) GetResponses() []*QueryResponse { + if x != nil { + return x.Responses + } + return nil +} + +var File_message_api_v1_message_api_proto protoreflect.FileDescriptor + +var file_message_api_v1_message_api_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, + 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4b, 0x0a, 0x0b, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x75, + 0x72, 0x73, 0x6f, 0x72, 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, 0x24, 0x0a, 0x0e, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, + 0x4e, 0x73, 0x22, 0x4c, 0x0a, 0x06, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x38, 0x0a, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x48, 0x00, 0x52, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x22, 0x99, 0x01, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x33, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x75, 0x72, 0x73, + 0x6f, 0x72, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x40, 0x0a, 0x09, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, + 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6c, 0x0a, 0x08, + 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 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, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x4d, 0x0a, 0x0e, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x09, + 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x52, 0x09, + 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x0a, 0x10, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xbb, + 0x01, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x70, 0x69, 0x63, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x54, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x65, 0x6e, + 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x8e, 0x01, 0x0a, + 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, + 0x0a, 0x09, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, + 0x52, 0x09, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x52, 0x0a, + 0x11, 0x42, 0x61, 0x74, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x73, 0x22, 0x56, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x2a, 0x6c, 0x0a, 0x0d, 0x53, 0x6f, 0x72, + 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x4f, + 0x52, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x4f, + 0x52, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x53, 0x43, + 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x4f, 0x52, 0x54, + 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x45, + 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x32, 0xc6, 0x05, 0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x41, 0x70, 0x69, 0x12, 0x74, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x12, 0x23, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x75, 0x0a, 0x09, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x25, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x22, + 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x30, 0x01, 0x12, 0x58, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x32, 0x12, 0x25, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x7f, 0x0a, + 0x0c, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x28, 0x2e, + 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x41, 0x6c, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, + 0x2a, 0x22, 0x19, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2d, 0x61, 0x6c, 0x6c, 0x30, 0x01, 0x12, 0x6c, + 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x21, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x81, 0x01, 0x0a, + 0x0a, 0x42, 0x61, 0x74, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x26, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x2d, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x42, 0xef, 0x01, 0x92, 0x41, 0x13, 0x12, 0x11, 0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x41, 0x70, 0x69, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x42, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x70, 0x69, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, + 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, + 0xaa, 0x02, 0x12, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, + 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x58, 0x6d, 0x74, + 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x58, 0x6d, + 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x41, 0x70, 0x69, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_api_v1_message_api_proto_rawDescOnce sync.Once + file_message_api_v1_message_api_proto_rawDescData = file_message_api_v1_message_api_proto_rawDesc +) + +func file_message_api_v1_message_api_proto_rawDescGZIP() []byte { + file_message_api_v1_message_api_proto_rawDescOnce.Do(func() { + file_message_api_v1_message_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_api_v1_message_api_proto_rawDescData) + }) + return file_message_api_v1_message_api_proto_rawDescData +} + +var file_message_api_v1_message_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_message_api_v1_message_api_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_message_api_v1_message_api_proto_goTypes = []interface{}{ + (SortDirection)(0), // 0: xmtp.message_api.v1.SortDirection + (*IndexCursor)(nil), // 1: xmtp.message_api.v1.IndexCursor + (*Cursor)(nil), // 2: xmtp.message_api.v1.Cursor + (*PagingInfo)(nil), // 3: xmtp.message_api.v1.PagingInfo + (*Envelope)(nil), // 4: xmtp.message_api.v1.Envelope + (*PublishRequest)(nil), // 5: xmtp.message_api.v1.PublishRequest + (*PublishResponse)(nil), // 6: xmtp.message_api.v1.PublishResponse + (*SubscribeRequest)(nil), // 7: xmtp.message_api.v1.SubscribeRequest + (*SubscribeAllRequest)(nil), // 8: xmtp.message_api.v1.SubscribeAllRequest + (*QueryRequest)(nil), // 9: xmtp.message_api.v1.QueryRequest + (*QueryResponse)(nil), // 10: xmtp.message_api.v1.QueryResponse + (*BatchQueryRequest)(nil), // 11: xmtp.message_api.v1.BatchQueryRequest + (*BatchQueryResponse)(nil), // 12: xmtp.message_api.v1.BatchQueryResponse +} +var file_message_api_v1_message_api_proto_depIdxs = []int32{ + 1, // 0: xmtp.message_api.v1.Cursor.index:type_name -> xmtp.message_api.v1.IndexCursor + 2, // 1: xmtp.message_api.v1.PagingInfo.cursor:type_name -> xmtp.message_api.v1.Cursor + 0, // 2: xmtp.message_api.v1.PagingInfo.direction:type_name -> xmtp.message_api.v1.SortDirection + 4, // 3: xmtp.message_api.v1.PublishRequest.envelopes:type_name -> xmtp.message_api.v1.Envelope + 3, // 4: xmtp.message_api.v1.QueryRequest.paging_info:type_name -> xmtp.message_api.v1.PagingInfo + 4, // 5: xmtp.message_api.v1.QueryResponse.envelopes:type_name -> xmtp.message_api.v1.Envelope + 3, // 6: xmtp.message_api.v1.QueryResponse.paging_info:type_name -> xmtp.message_api.v1.PagingInfo + 9, // 7: xmtp.message_api.v1.BatchQueryRequest.requests:type_name -> xmtp.message_api.v1.QueryRequest + 10, // 8: xmtp.message_api.v1.BatchQueryResponse.responses:type_name -> xmtp.message_api.v1.QueryResponse + 5, // 9: xmtp.message_api.v1.MessageApi.Publish:input_type -> xmtp.message_api.v1.PublishRequest + 7, // 10: xmtp.message_api.v1.MessageApi.Subscribe:input_type -> xmtp.message_api.v1.SubscribeRequest + 7, // 11: xmtp.message_api.v1.MessageApi.Subscribe2:input_type -> xmtp.message_api.v1.SubscribeRequest + 8, // 12: xmtp.message_api.v1.MessageApi.SubscribeAll:input_type -> xmtp.message_api.v1.SubscribeAllRequest + 9, // 13: xmtp.message_api.v1.MessageApi.Query:input_type -> xmtp.message_api.v1.QueryRequest + 11, // 14: xmtp.message_api.v1.MessageApi.BatchQuery:input_type -> xmtp.message_api.v1.BatchQueryRequest + 6, // 15: xmtp.message_api.v1.MessageApi.Publish:output_type -> xmtp.message_api.v1.PublishResponse + 4, // 16: xmtp.message_api.v1.MessageApi.Subscribe:output_type -> xmtp.message_api.v1.Envelope + 4, // 17: xmtp.message_api.v1.MessageApi.Subscribe2:output_type -> xmtp.message_api.v1.Envelope + 4, // 18: xmtp.message_api.v1.MessageApi.SubscribeAll:output_type -> xmtp.message_api.v1.Envelope + 10, // 19: xmtp.message_api.v1.MessageApi.Query:output_type -> xmtp.message_api.v1.QueryResponse + 12, // 20: xmtp.message_api.v1.MessageApi.BatchQuery:output_type -> xmtp.message_api.v1.BatchQueryResponse + 15, // [15:21] is the sub-list for method output_type + 9, // [9:15] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_message_api_v1_message_api_proto_init() } +func file_message_api_v1_message_api_proto_init() { + if File_message_api_v1_message_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_message_api_v1_message_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IndexCursor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_api_v1_message_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Cursor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_api_v1_message_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PagingInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_api_v1_message_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Envelope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_api_v1_message_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublishRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_api_v1_message_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublishResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_api_v1_message_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscribeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_api_v1_message_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscribeAllRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_api_v1_message_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_api_v1_message_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_api_v1_message_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchQueryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_api_v1_message_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchQueryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_message_api_v1_message_api_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Cursor_Index)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_api_v1_message_api_proto_rawDesc, + NumEnums: 1, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_message_api_v1_message_api_proto_goTypes, + DependencyIndexes: file_message_api_v1_message_api_proto_depIdxs, + EnumInfos: file_message_api_v1_message_api_proto_enumTypes, + MessageInfos: file_message_api_v1_message_api_proto_msgTypes, + }.Build() + File_message_api_v1_message_api_proto = out.File + file_message_api_v1_message_api_proto_rawDesc = nil + file_message_api_v1_message_api_proto_goTypes = nil + file_message_api_v1_message_api_proto_depIdxs = nil +} diff --git a/pkg/proto/message_api/v1/message_api.pb.gw.go b/pkg/proto/message_api/v1/message_api.pb.gw.go new file mode 100644 index 00000000..f2d9da8d --- /dev/null +++ b/pkg/proto/message_api/v1/message_api.pb.gw.go @@ -0,0 +1,425 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: message_api/v1/message_api.proto + +/* +Package message_apiv1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package message_apiv1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_MessageApi_Publish_0(ctx context.Context, marshaler runtime.Marshaler, client MessageApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PublishRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Publish(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MessageApi_Publish_0(ctx context.Context, marshaler runtime.Marshaler, server MessageApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PublishRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Publish(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MessageApi_Subscribe_0(ctx context.Context, marshaler runtime.Marshaler, client MessageApiClient, req *http.Request, pathParams map[string]string) (MessageApi_SubscribeClient, runtime.ServerMetadata, error) { + var protoReq SubscribeRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.Subscribe(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +func request_MessageApi_SubscribeAll_0(ctx context.Context, marshaler runtime.Marshaler, client MessageApiClient, req *http.Request, pathParams map[string]string) (MessageApi_SubscribeAllClient, runtime.ServerMetadata, error) { + var protoReq SubscribeAllRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.SubscribeAll(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +func request_MessageApi_Query_0(ctx context.Context, marshaler runtime.Marshaler, client MessageApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Query(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MessageApi_Query_0(ctx context.Context, marshaler runtime.Marshaler, server MessageApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Query(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MessageApi_BatchQuery_0(ctx context.Context, marshaler runtime.Marshaler, client MessageApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BatchQueryRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.BatchQuery(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MessageApi_BatchQuery_0(ctx context.Context, marshaler runtime.Marshaler, server MessageApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BatchQueryRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.BatchQuery(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterMessageApiHandlerServer registers the http handlers for service MessageApi to "mux". +// UnaryRPC :call MessageApiServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMessageApiHandlerFromEndpoint instead. +func RegisterMessageApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MessageApiServer) error { + + mux.Handle("POST", pattern_MessageApi_Publish_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/xmtp.message_api.v1.MessageApi/Publish", runtime.WithHTTPPathPattern("/message/v1/publish")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MessageApi_Publish_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MessageApi_Publish_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MessageApi_Subscribe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + mux.Handle("POST", pattern_MessageApi_SubscribeAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + mux.Handle("POST", pattern_MessageApi_Query_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/xmtp.message_api.v1.MessageApi/Query", runtime.WithHTTPPathPattern("/message/v1/query")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MessageApi_Query_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MessageApi_Query_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MessageApi_BatchQuery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/xmtp.message_api.v1.MessageApi/BatchQuery", runtime.WithHTTPPathPattern("/message/v1/batch-query")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MessageApi_BatchQuery_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MessageApi_BatchQuery_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterMessageApiHandlerFromEndpoint is same as RegisterMessageApiHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMessageApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMessageApiHandler(ctx, mux, conn) +} + +// RegisterMessageApiHandler registers the http handlers for service MessageApi to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMessageApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMessageApiHandlerClient(ctx, mux, NewMessageApiClient(conn)) +} + +// RegisterMessageApiHandlerClient registers the http handlers for service MessageApi +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MessageApiClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MessageApiClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MessageApiClient" to call the correct interceptors. +func RegisterMessageApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MessageApiClient) error { + + mux.Handle("POST", pattern_MessageApi_Publish_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.message_api.v1.MessageApi/Publish", runtime.WithHTTPPathPattern("/message/v1/publish")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MessageApi_Publish_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MessageApi_Publish_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MessageApi_Subscribe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.message_api.v1.MessageApi/Subscribe", runtime.WithHTTPPathPattern("/message/v1/subscribe")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MessageApi_Subscribe_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MessageApi_Subscribe_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MessageApi_SubscribeAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.message_api.v1.MessageApi/SubscribeAll", runtime.WithHTTPPathPattern("/message/v1/subscribe-all")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MessageApi_SubscribeAll_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MessageApi_SubscribeAll_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MessageApi_Query_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.message_api.v1.MessageApi/Query", runtime.WithHTTPPathPattern("/message/v1/query")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MessageApi_Query_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MessageApi_Query_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MessageApi_BatchQuery_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.message_api.v1.MessageApi/BatchQuery", runtime.WithHTTPPathPattern("/message/v1/batch-query")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MessageApi_BatchQuery_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MessageApi_BatchQuery_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_MessageApi_Publish_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"message", "v1", "publish"}, "")) + + pattern_MessageApi_Subscribe_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"message", "v1", "subscribe"}, "")) + + pattern_MessageApi_SubscribeAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"message", "v1", "subscribe-all"}, "")) + + pattern_MessageApi_Query_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"message", "v1", "query"}, "")) + + pattern_MessageApi_BatchQuery_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"message", "v1", "batch-query"}, "")) +) + +var ( + forward_MessageApi_Publish_0 = runtime.ForwardResponseMessage + + forward_MessageApi_Subscribe_0 = runtime.ForwardResponseStream + + forward_MessageApi_SubscribeAll_0 = runtime.ForwardResponseStream + + forward_MessageApi_Query_0 = runtime.ForwardResponseMessage + + forward_MessageApi_BatchQuery_0 = runtime.ForwardResponseMessage +) diff --git a/pkg/proto/message_api/v1/message_api_grpc.pb.go b/pkg/proto/message_api/v1/message_api_grpc.pb.go new file mode 100644 index 00000000..b422aaa9 --- /dev/null +++ b/pkg/proto/message_api/v1/message_api_grpc.pb.go @@ -0,0 +1,399 @@ +// Message API + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: message_api/v1/message_api.proto + +package message_apiv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + MessageApi_Publish_FullMethodName = "/xmtp.message_api.v1.MessageApi/Publish" + MessageApi_Subscribe_FullMethodName = "/xmtp.message_api.v1.MessageApi/Subscribe" + MessageApi_Subscribe2_FullMethodName = "/xmtp.message_api.v1.MessageApi/Subscribe2" + MessageApi_SubscribeAll_FullMethodName = "/xmtp.message_api.v1.MessageApi/SubscribeAll" + MessageApi_Query_FullMethodName = "/xmtp.message_api.v1.MessageApi/Query" + MessageApi_BatchQuery_FullMethodName = "/xmtp.message_api.v1.MessageApi/BatchQuery" +) + +// MessageApiClient is the client API for MessageApi service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MessageApiClient interface { + // Publish messages to the network + Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error) + // Subscribe to a stream of new envelopes matching a predicate + Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (MessageApi_SubscribeClient, error) + // Subscribe to a stream of new envelopes and your subscription using + // bidirectional streaming + // protolint:disable:next RPC_REQUEST_STANDARD_NAME + Subscribe2(ctx context.Context, opts ...grpc.CallOption) (MessageApi_Subscribe2Client, error) + // Subscribe to a stream of all messages + SubscribeAll(ctx context.Context, in *SubscribeAllRequest, opts ...grpc.CallOption) (MessageApi_SubscribeAllClient, error) + // Query the store for messages + Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) + // BatchQuery containing a set of queries to be processed + BatchQuery(ctx context.Context, in *BatchQueryRequest, opts ...grpc.CallOption) (*BatchQueryResponse, error) +} + +type messageApiClient struct { + cc grpc.ClientConnInterface +} + +func NewMessageApiClient(cc grpc.ClientConnInterface) MessageApiClient { + return &messageApiClient{cc} +} + +func (c *messageApiClient) Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error) { + out := new(PublishResponse) + err := c.cc.Invoke(ctx, MessageApi_Publish_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *messageApiClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (MessageApi_SubscribeClient, error) { + stream, err := c.cc.NewStream(ctx, &MessageApi_ServiceDesc.Streams[0], MessageApi_Subscribe_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &messageApiSubscribeClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type MessageApi_SubscribeClient interface { + Recv() (*Envelope, error) + grpc.ClientStream +} + +type messageApiSubscribeClient struct { + grpc.ClientStream +} + +func (x *messageApiSubscribeClient) Recv() (*Envelope, error) { + m := new(Envelope) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *messageApiClient) Subscribe2(ctx context.Context, opts ...grpc.CallOption) (MessageApi_Subscribe2Client, error) { + stream, err := c.cc.NewStream(ctx, &MessageApi_ServiceDesc.Streams[1], MessageApi_Subscribe2_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &messageApiSubscribe2Client{stream} + return x, nil +} + +type MessageApi_Subscribe2Client interface { + Send(*SubscribeRequest) error + Recv() (*Envelope, error) + grpc.ClientStream +} + +type messageApiSubscribe2Client struct { + grpc.ClientStream +} + +func (x *messageApiSubscribe2Client) Send(m *SubscribeRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *messageApiSubscribe2Client) Recv() (*Envelope, error) { + m := new(Envelope) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *messageApiClient) SubscribeAll(ctx context.Context, in *SubscribeAllRequest, opts ...grpc.CallOption) (MessageApi_SubscribeAllClient, error) { + stream, err := c.cc.NewStream(ctx, &MessageApi_ServiceDesc.Streams[2], MessageApi_SubscribeAll_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &messageApiSubscribeAllClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type MessageApi_SubscribeAllClient interface { + Recv() (*Envelope, error) + grpc.ClientStream +} + +type messageApiSubscribeAllClient struct { + grpc.ClientStream +} + +func (x *messageApiSubscribeAllClient) Recv() (*Envelope, error) { + m := new(Envelope) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *messageApiClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) { + out := new(QueryResponse) + err := c.cc.Invoke(ctx, MessageApi_Query_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *messageApiClient) BatchQuery(ctx context.Context, in *BatchQueryRequest, opts ...grpc.CallOption) (*BatchQueryResponse, error) { + out := new(BatchQueryResponse) + err := c.cc.Invoke(ctx, MessageApi_BatchQuery_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MessageApiServer is the server API for MessageApi service. +// All implementations must embed UnimplementedMessageApiServer +// for forward compatibility +type MessageApiServer interface { + // Publish messages to the network + Publish(context.Context, *PublishRequest) (*PublishResponse, error) + // Subscribe to a stream of new envelopes matching a predicate + Subscribe(*SubscribeRequest, MessageApi_SubscribeServer) error + // Subscribe to a stream of new envelopes and your subscription using + // bidirectional streaming + // protolint:disable:next RPC_REQUEST_STANDARD_NAME + Subscribe2(MessageApi_Subscribe2Server) error + // Subscribe to a stream of all messages + SubscribeAll(*SubscribeAllRequest, MessageApi_SubscribeAllServer) error + // Query the store for messages + Query(context.Context, *QueryRequest) (*QueryResponse, error) + // BatchQuery containing a set of queries to be processed + BatchQuery(context.Context, *BatchQueryRequest) (*BatchQueryResponse, error) + mustEmbedUnimplementedMessageApiServer() +} + +// UnimplementedMessageApiServer must be embedded to have forward compatible implementations. +type UnimplementedMessageApiServer struct { +} + +func (UnimplementedMessageApiServer) Publish(context.Context, *PublishRequest) (*PublishResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Publish not implemented") +} +func (UnimplementedMessageApiServer) Subscribe(*SubscribeRequest, MessageApi_SubscribeServer) error { + return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") +} +func (UnimplementedMessageApiServer) Subscribe2(MessageApi_Subscribe2Server) error { + return status.Errorf(codes.Unimplemented, "method Subscribe2 not implemented") +} +func (UnimplementedMessageApiServer) SubscribeAll(*SubscribeAllRequest, MessageApi_SubscribeAllServer) error { + return status.Errorf(codes.Unimplemented, "method SubscribeAll not implemented") +} +func (UnimplementedMessageApiServer) Query(context.Context, *QueryRequest) (*QueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Query not implemented") +} +func (UnimplementedMessageApiServer) BatchQuery(context.Context, *BatchQueryRequest) (*BatchQueryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchQuery not implemented") +} +func (UnimplementedMessageApiServer) mustEmbedUnimplementedMessageApiServer() {} + +// UnsafeMessageApiServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MessageApiServer will +// result in compilation errors. +type UnsafeMessageApiServer interface { + mustEmbedUnimplementedMessageApiServer() +} + +func RegisterMessageApiServer(s grpc.ServiceRegistrar, srv MessageApiServer) { + s.RegisterService(&MessageApi_ServiceDesc, srv) +} + +func _MessageApi_Publish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PublishRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessageApiServer).Publish(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MessageApi_Publish_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessageApiServer).Publish(ctx, req.(*PublishRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MessageApi_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscribeRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(MessageApiServer).Subscribe(m, &messageApiSubscribeServer{stream}) +} + +type MessageApi_SubscribeServer interface { + Send(*Envelope) error + grpc.ServerStream +} + +type messageApiSubscribeServer struct { + grpc.ServerStream +} + +func (x *messageApiSubscribeServer) Send(m *Envelope) error { + return x.ServerStream.SendMsg(m) +} + +func _MessageApi_Subscribe2_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(MessageApiServer).Subscribe2(&messageApiSubscribe2Server{stream}) +} + +type MessageApi_Subscribe2Server interface { + Send(*Envelope) error + Recv() (*SubscribeRequest, error) + grpc.ServerStream +} + +type messageApiSubscribe2Server struct { + grpc.ServerStream +} + +func (x *messageApiSubscribe2Server) Send(m *Envelope) error { + return x.ServerStream.SendMsg(m) +} + +func (x *messageApiSubscribe2Server) Recv() (*SubscribeRequest, error) { + m := new(SubscribeRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _MessageApi_SubscribeAll_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscribeAllRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(MessageApiServer).SubscribeAll(m, &messageApiSubscribeAllServer{stream}) +} + +type MessageApi_SubscribeAllServer interface { + Send(*Envelope) error + grpc.ServerStream +} + +type messageApiSubscribeAllServer struct { + grpc.ServerStream +} + +func (x *messageApiSubscribeAllServer) Send(m *Envelope) error { + return x.ServerStream.SendMsg(m) +} + +func _MessageApi_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessageApiServer).Query(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MessageApi_Query_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessageApiServer).Query(ctx, req.(*QueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MessageApi_BatchQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchQueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MessageApiServer).BatchQuery(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MessageApi_BatchQuery_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MessageApiServer).BatchQuery(ctx, req.(*BatchQueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// MessageApi_ServiceDesc is the grpc.ServiceDesc for MessageApi service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MessageApi_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "xmtp.message_api.v1.MessageApi", + HandlerType: (*MessageApiServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Publish", + Handler: _MessageApi_Publish_Handler, + }, + { + MethodName: "Query", + Handler: _MessageApi_Query_Handler, + }, + { + MethodName: "BatchQuery", + Handler: _MessageApi_BatchQuery_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Subscribe", + Handler: _MessageApi_Subscribe_Handler, + ServerStreams: true, + }, + { + StreamName: "Subscribe2", + Handler: _MessageApi_Subscribe2_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "SubscribeAll", + Handler: _MessageApi_SubscribeAll_Handler, + ServerStreams: true, + }, + }, + Metadata: "message_api/v1/message_api.proto", +} diff --git a/pkg/proto/message_contents/ciphertext.pb.go b/pkg/proto/message_contents/ciphertext.pb.go new file mode 100644 index 00000000..090ab5d1 --- /dev/null +++ b/pkg/proto/message_contents/ciphertext.pb.go @@ -0,0 +1,454 @@ +// Ciphertext is a generic structure for encrypted payload. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/ciphertext.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Ciphertext represents encrypted payload. +// It is definited as a union to support cryptographic algorithm agility. +// The payload is accompanied by the cryptographic parameters +// required by the chosen encryption scheme. +type Ciphertext struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Union: + // + // *Ciphertext_Aes256GcmHkdfSha256 + Union isCiphertext_Union `protobuf_oneof:"union"` +} + +func (x *Ciphertext) Reset() { + *x = Ciphertext{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_ciphertext_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Ciphertext) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ciphertext) ProtoMessage() {} + +func (x *Ciphertext) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_ciphertext_proto_msgTypes[0] + 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 Ciphertext.ProtoReflect.Descriptor instead. +func (*Ciphertext) Descriptor() ([]byte, []int) { + return file_message_contents_ciphertext_proto_rawDescGZIP(), []int{0} +} + +func (m *Ciphertext) GetUnion() isCiphertext_Union { + if m != nil { + return m.Union + } + return nil +} + +func (x *Ciphertext) GetAes256GcmHkdfSha256() *Ciphertext_Aes256GcmHkdfsha256 { + if x, ok := x.GetUnion().(*Ciphertext_Aes256GcmHkdfSha256); ok { + return x.Aes256GcmHkdfSha256 + } + return nil +} + +type isCiphertext_Union interface { + isCiphertext_Union() +} + +type Ciphertext_Aes256GcmHkdfSha256 struct { + Aes256GcmHkdfSha256 *Ciphertext_Aes256GcmHkdfsha256 `protobuf:"bytes,1,opt,name=aes256_gcm_hkdf_sha256,json=aes256GcmHkdfSha256,proto3,oneof"` +} + +func (*Ciphertext_Aes256GcmHkdfSha256) isCiphertext_Union() {} + +// SignedEciesCiphertext represents an ECIES encrypted payload and a signature +type SignedEciesCiphertext struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // serialized Ecies message + EciesBytes []byte `protobuf:"bytes,1,opt,name=ecies_bytes,json=eciesBytes,proto3" json:"ecies_bytes,omitempty"` + // signature of sha256(ecies_bytes) signed with the IdentityKey + Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *SignedEciesCiphertext) Reset() { + *x = SignedEciesCiphertext{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_ciphertext_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedEciesCiphertext) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedEciesCiphertext) ProtoMessage() {} + +func (x *SignedEciesCiphertext) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_ciphertext_proto_msgTypes[1] + 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 SignedEciesCiphertext.ProtoReflect.Descriptor instead. +func (*SignedEciesCiphertext) Descriptor() ([]byte, []int) { + return file_message_contents_ciphertext_proto_rawDescGZIP(), []int{1} +} + +func (x *SignedEciesCiphertext) GetEciesBytes() []byte { + if x != nil { + return x.EciesBytes + } + return nil +} + +func (x *SignedEciesCiphertext) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + +// Encryption: AES256-GCM +// Key derivation function: HKDF-SHA256 +type Ciphertext_Aes256GcmHkdfsha256 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HkdfSalt []byte `protobuf:"bytes,1,opt,name=hkdf_salt,json=hkdfSalt,proto3" json:"hkdf_salt,omitempty"` // 32 bytes + GcmNonce []byte `protobuf:"bytes,2,opt,name=gcm_nonce,json=gcmNonce,proto3" json:"gcm_nonce,omitempty"` // 12 bytes + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // encrypted payload +} + +func (x *Ciphertext_Aes256GcmHkdfsha256) Reset() { + *x = Ciphertext_Aes256GcmHkdfsha256{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_ciphertext_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Ciphertext_Aes256GcmHkdfsha256) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ciphertext_Aes256GcmHkdfsha256) ProtoMessage() {} + +func (x *Ciphertext_Aes256GcmHkdfsha256) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_ciphertext_proto_msgTypes[2] + 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 Ciphertext_Aes256GcmHkdfsha256.ProtoReflect.Descriptor instead. +func (*Ciphertext_Aes256GcmHkdfsha256) Descriptor() ([]byte, []int) { + return file_message_contents_ciphertext_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Ciphertext_Aes256GcmHkdfsha256) GetHkdfSalt() []byte { + if x != nil { + return x.HkdfSalt + } + return nil +} + +func (x *Ciphertext_Aes256GcmHkdfsha256) GetGcmNonce() []byte { + if x != nil { + return x.GcmNonce + } + return nil +} + +func (x *Ciphertext_Aes256GcmHkdfsha256) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// Ecies is ciphertext encrypted using ECIES with a MAC +type SignedEciesCiphertext_Ecies struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EphemeralPublicKey []byte `protobuf:"bytes,1,opt,name=ephemeral_public_key,json=ephemeralPublicKey,proto3" json:"ephemeral_public_key,omitempty"` // 65 bytes + Iv []byte `protobuf:"bytes,2,opt,name=iv,proto3" json:"iv,omitempty"` // 16 bytes + Mac []byte `protobuf:"bytes,3,opt,name=mac,proto3" json:"mac,omitempty"` // 32 bytes + Ciphertext []byte `protobuf:"bytes,4,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` // encrypted payload with block size of 16 +} + +func (x *SignedEciesCiphertext_Ecies) Reset() { + *x = SignedEciesCiphertext_Ecies{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_ciphertext_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedEciesCiphertext_Ecies) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedEciesCiphertext_Ecies) ProtoMessage() {} + +func (x *SignedEciesCiphertext_Ecies) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_ciphertext_proto_msgTypes[3] + 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 SignedEciesCiphertext_Ecies.ProtoReflect.Descriptor instead. +func (*SignedEciesCiphertext_Ecies) Descriptor() ([]byte, []int) { + return file_message_contents_ciphertext_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *SignedEciesCiphertext_Ecies) GetEphemeralPublicKey() []byte { + if x != nil { + return x.EphemeralPublicKey + } + return nil +} + +func (x *SignedEciesCiphertext_Ecies) GetIv() []byte { + if x != nil { + return x.Iv + } + return nil +} + +func (x *SignedEciesCiphertext_Ecies) GetMac() []byte { + if x != nil { + return x.Mac + } + return nil +} + +func (x *SignedEciesCiphertext_Ecies) GetCiphertext() []byte { + if x != nil { + return x.Ciphertext + } + return nil +} + +var File_message_contents_ciphertext_proto protoreflect.FileDescriptor + +var file_message_contents_ciphertext_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x20, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee, 0x01, 0x0a, + 0x0a, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x12, 0x6c, 0x0a, 0x16, 0x61, + 0x65, 0x73, 0x32, 0x35, 0x36, 0x5f, 0x67, 0x63, 0x6d, 0x5f, 0x68, 0x6b, 0x64, 0x66, 0x5f, 0x73, + 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x41, + 0x65, 0x73, 0x32, 0x35, 0x36, 0x67, 0x63, 0x6d, 0x48, 0x6b, 0x64, 0x66, 0x73, 0x68, 0x61, 0x32, + 0x35, 0x36, 0x48, 0x00, 0x52, 0x13, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x47, 0x63, 0x6d, 0x48, + 0x6b, 0x64, 0x66, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x1a, 0x69, 0x0a, 0x13, 0x41, 0x65, 0x73, + 0x32, 0x35, 0x36, 0x67, 0x63, 0x6d, 0x48, 0x6b, 0x64, 0x66, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, + 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6b, 0x64, 0x66, 0x5f, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x08, 0x68, 0x6b, 0x64, 0x66, 0x53, 0x61, 0x6c, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x67, 0x63, 0x6d, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x08, 0x67, 0x63, 0x6d, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 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, 0x42, 0x07, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x22, 0xf5, 0x01, + 0x0a, 0x15, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, 0x63, 0x69, 0x65, 0x73, 0x43, 0x69, 0x70, + 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x63, 0x69, 0x65, 0x73, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x65, 0x63, + 0x69, 0x65, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 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, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x7b, 0x0a, 0x05, 0x45, 0x63, 0x69, 0x65, + 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x12, 0x65, 0x70, 0x68, 0x65, 0x6d, 0x65, 0x72, 0x61, 0x6c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x02, 0x69, 0x76, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, + 0x72, 0x74, 0x65, 0x78, 0x74, 0x42, 0xd6, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x42, 0x0f, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, + 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, + 0x02, 0x03, 0x58, 0x4d, 0x58, 0xaa, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x14, 0x58, + 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x20, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_ciphertext_proto_rawDescOnce sync.Once + file_message_contents_ciphertext_proto_rawDescData = file_message_contents_ciphertext_proto_rawDesc +) + +func file_message_contents_ciphertext_proto_rawDescGZIP() []byte { + file_message_contents_ciphertext_proto_rawDescOnce.Do(func() { + file_message_contents_ciphertext_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_ciphertext_proto_rawDescData) + }) + return file_message_contents_ciphertext_proto_rawDescData +} + +var file_message_contents_ciphertext_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_message_contents_ciphertext_proto_goTypes = []interface{}{ + (*Ciphertext)(nil), // 0: xmtp.message_contents.Ciphertext + (*SignedEciesCiphertext)(nil), // 1: xmtp.message_contents.SignedEciesCiphertext + (*Ciphertext_Aes256GcmHkdfsha256)(nil), // 2: xmtp.message_contents.Ciphertext.Aes256gcmHkdfsha256 + (*SignedEciesCiphertext_Ecies)(nil), // 3: xmtp.message_contents.SignedEciesCiphertext.Ecies + (*Signature)(nil), // 4: xmtp.message_contents.Signature +} +var file_message_contents_ciphertext_proto_depIdxs = []int32{ + 2, // 0: xmtp.message_contents.Ciphertext.aes256_gcm_hkdf_sha256:type_name -> xmtp.message_contents.Ciphertext.Aes256gcmHkdfsha256 + 4, // 1: xmtp.message_contents.SignedEciesCiphertext.signature:type_name -> xmtp.message_contents.Signature + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_message_contents_ciphertext_proto_init() } +func file_message_contents_ciphertext_proto_init() { + if File_message_contents_ciphertext_proto != nil { + return + } + file_message_contents_signature_proto_init() + if !protoimpl.UnsafeEnabled { + file_message_contents_ciphertext_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ciphertext); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_ciphertext_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedEciesCiphertext); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_ciphertext_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ciphertext_Aes256GcmHkdfsha256); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_ciphertext_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedEciesCiphertext_Ecies); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_message_contents_ciphertext_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Ciphertext_Aes256GcmHkdfSha256)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_ciphertext_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_ciphertext_proto_goTypes, + DependencyIndexes: file_message_contents_ciphertext_proto_depIdxs, + MessageInfos: file_message_contents_ciphertext_proto_msgTypes, + }.Build() + File_message_contents_ciphertext_proto = out.File + file_message_contents_ciphertext_proto_rawDesc = nil + file_message_contents_ciphertext_proto_goTypes = nil + file_message_contents_ciphertext_proto_depIdxs = nil +} diff --git a/pkg/proto/message_contents/composite.pb.go b/pkg/proto/message_contents/composite.pb.go new file mode 100644 index 00000000..fec832a1 --- /dev/null +++ b/pkg/proto/message_contents/composite.pb.go @@ -0,0 +1,277 @@ +// Composite ContentType + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/composite.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Composite is used to implement xmtp.org/composite content type +type Composite struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Parts []*Composite_Part `protobuf:"bytes,1,rep,name=parts,proto3" json:"parts,omitempty"` +} + +func (x *Composite) Reset() { + *x = Composite{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_composite_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Composite) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Composite) ProtoMessage() {} + +func (x *Composite) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_composite_proto_msgTypes[0] + 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 Composite.ProtoReflect.Descriptor instead. +func (*Composite) Descriptor() ([]byte, []int) { + return file_message_contents_composite_proto_rawDescGZIP(), []int{0} +} + +func (x *Composite) GetParts() []*Composite_Part { + if x != nil { + return x.Parts + } + return nil +} + +// Part represents one section of a composite message +type Composite_Part struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Element: + // + // *Composite_Part_Part + // *Composite_Part_Composite + Element isComposite_Part_Element `protobuf_oneof:"element"` +} + +func (x *Composite_Part) Reset() { + *x = Composite_Part{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_composite_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Composite_Part) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Composite_Part) ProtoMessage() {} + +func (x *Composite_Part) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_composite_proto_msgTypes[1] + 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 Composite_Part.ProtoReflect.Descriptor instead. +func (*Composite_Part) Descriptor() ([]byte, []int) { + return file_message_contents_composite_proto_rawDescGZIP(), []int{0, 0} +} + +func (m *Composite_Part) GetElement() isComposite_Part_Element { + if m != nil { + return m.Element + } + return nil +} + +func (x *Composite_Part) GetPart() *EncodedContent { + if x, ok := x.GetElement().(*Composite_Part_Part); ok { + return x.Part + } + return nil +} + +func (x *Composite_Part) GetComposite() *Composite { + if x, ok := x.GetElement().(*Composite_Part_Composite); ok { + return x.Composite + } + return nil +} + +type isComposite_Part_Element interface { + isComposite_Part_Element() +} + +type Composite_Part_Part struct { + Part *EncodedContent `protobuf:"bytes,1,opt,name=part,proto3,oneof"` +} + +type Composite_Part_Composite struct { + Composite *Composite `protobuf:"bytes,2,opt,name=composite,proto3,oneof"` +} + +func (*Composite_Part_Part) isComposite_Part_Element() {} + +func (*Composite_Part_Composite) isComposite_Part_Element() {} + +var File_message_contents_composite_proto protoreflect.FileDescriptor + +var file_message_contents_composite_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x15, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x1e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x01, 0x0a, 0x09, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 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, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x52, 0x05, 0x70, + 0x61, 0x72, 0x74, 0x73, 0x1a, 0x90, 0x01, 0x0a, 0x04, 0x50, 0x61, 0x72, 0x74, 0x12, 0x3b, 0x0a, + 0x04, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, 0x72, 0x74, 0x12, 0x40, 0x0a, 0x09, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 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, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x48, + 0x00, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0xd5, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, + 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, + 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, 0xaa, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x14, + 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x20, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_composite_proto_rawDescOnce sync.Once + file_message_contents_composite_proto_rawDescData = file_message_contents_composite_proto_rawDesc +) + +func file_message_contents_composite_proto_rawDescGZIP() []byte { + file_message_contents_composite_proto_rawDescOnce.Do(func() { + file_message_contents_composite_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_composite_proto_rawDescData) + }) + return file_message_contents_composite_proto_rawDescData +} + +var file_message_contents_composite_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_message_contents_composite_proto_goTypes = []interface{}{ + (*Composite)(nil), // 0: xmtp.message_contents.Composite + (*Composite_Part)(nil), // 1: xmtp.message_contents.Composite.Part + (*EncodedContent)(nil), // 2: xmtp.message_contents.EncodedContent +} +var file_message_contents_composite_proto_depIdxs = []int32{ + 1, // 0: xmtp.message_contents.Composite.parts:type_name -> xmtp.message_contents.Composite.Part + 2, // 1: xmtp.message_contents.Composite.Part.part:type_name -> xmtp.message_contents.EncodedContent + 0, // 2: xmtp.message_contents.Composite.Part.composite:type_name -> xmtp.message_contents.Composite + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_message_contents_composite_proto_init() } +func file_message_contents_composite_proto_init() { + if File_message_contents_composite_proto != nil { + return + } + file_message_contents_content_proto_init() + if !protoimpl.UnsafeEnabled { + file_message_contents_composite_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Composite); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_composite_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Composite_Part); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_message_contents_composite_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Composite_Part_Part)(nil), + (*Composite_Part_Composite)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_composite_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_composite_proto_goTypes, + DependencyIndexes: file_message_contents_composite_proto_depIdxs, + MessageInfos: file_message_contents_composite_proto_msgTypes, + }.Build() + File_message_contents_composite_proto = out.File + file_message_contents_composite_proto_rawDesc = nil + file_message_contents_composite_proto_goTypes = nil + file_message_contents_composite_proto_depIdxs = nil +} diff --git a/pkg/proto/message_contents/contact.pb.go b/pkg/proto/message_contents/contact.pb.go new file mode 100644 index 00000000..834a08e2 --- /dev/null +++ b/pkg/proto/message_contents/contact.pb.go @@ -0,0 +1,352 @@ +// Contact Bundles are used to advertise user's public keys on the network. +// They are published in well known topics so that other participants +// can find them when they wish to communicate with the user. +// The public keys are used to sign messages and to derive encryption keys +// for some meta-messages, e.g. invitations. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/contact.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// LEGACY: User key bundle V1 using PublicKeys. +// The PublicKeys MUST be signed. +type ContactBundleV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyBundle *PublicKeyBundle `protobuf:"bytes,1,opt,name=key_bundle,json=keyBundle,proto3" json:"key_bundle,omitempty"` +} + +func (x *ContactBundleV1) Reset() { + *x = ContactBundleV1{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_contact_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContactBundleV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContactBundleV1) ProtoMessage() {} + +func (x *ContactBundleV1) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_contact_proto_msgTypes[0] + 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 ContactBundleV1.ProtoReflect.Descriptor instead. +func (*ContactBundleV1) Descriptor() ([]byte, []int) { + return file_message_contents_contact_proto_rawDescGZIP(), []int{0} +} + +func (x *ContactBundleV1) GetKeyBundle() *PublicKeyBundle { + if x != nil { + return x.KeyBundle + } + return nil +} + +// User key bundle V2 using SignedPublicKeys. +type ContactBundleV2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyBundle *SignedPublicKeyBundle `protobuf:"bytes,1,opt,name=key_bundle,json=keyBundle,proto3" json:"key_bundle,omitempty"` +} + +func (x *ContactBundleV2) Reset() { + *x = ContactBundleV2{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_contact_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContactBundleV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContactBundleV2) ProtoMessage() {} + +func (x *ContactBundleV2) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_contact_proto_msgTypes[1] + 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 ContactBundleV2.ProtoReflect.Descriptor instead. +func (*ContactBundleV2) Descriptor() ([]byte, []int) { + return file_message_contents_contact_proto_rawDescGZIP(), []int{1} +} + +func (x *ContactBundleV2) GetKeyBundle() *SignedPublicKeyBundle { + if x != nil { + return x.KeyBundle + } + return nil +} + +// Versioned ContactBundle +type ContactBundle struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *ContactBundle_V1 + // *ContactBundle_V2 + Version isContactBundle_Version `protobuf_oneof:"version"` +} + +func (x *ContactBundle) Reset() { + *x = ContactBundle{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_contact_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContactBundle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContactBundle) ProtoMessage() {} + +func (x *ContactBundle) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_contact_proto_msgTypes[2] + 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 ContactBundle.ProtoReflect.Descriptor instead. +func (*ContactBundle) Descriptor() ([]byte, []int) { + return file_message_contents_contact_proto_rawDescGZIP(), []int{2} +} + +func (m *ContactBundle) GetVersion() isContactBundle_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *ContactBundle) GetV1() *ContactBundleV1 { + if x, ok := x.GetVersion().(*ContactBundle_V1); ok { + return x.V1 + } + return nil +} + +func (x *ContactBundle) GetV2() *ContactBundleV2 { + if x, ok := x.GetVersion().(*ContactBundle_V2); ok { + return x.V2 + } + return nil +} + +type isContactBundle_Version interface { + isContactBundle_Version() +} + +type ContactBundle_V1 struct { + V1 *ContactBundleV1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +type ContactBundle_V2 struct { + V2 *ContactBundleV2 `protobuf:"bytes,2,opt,name=v2,proto3,oneof"` +} + +func (*ContactBundle_V1) isContactBundle_Version() {} + +func (*ContactBundle_V2) isContactBundle_Version() {} + +var File_message_contents_contact_proto protoreflect.FileDescriptor + +var file_message_contents_contact_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x15, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a, 0x0f, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x63, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x56, 0x31, 0x12, 0x45, 0x0a, + 0x0a, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x5e, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x42, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x56, 0x32, 0x12, 0x4b, 0x0a, 0x0a, 0x6b, 0x65, 0x79, 0x5f, 0x62, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 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, 0x6b, 0x65, 0x79, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, + 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x38, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 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, 0x74, 0x61, + 0x63, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, + 0x12, 0x38, 0x0a, 0x02, 0x76, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 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, 0x74, 0x61, 0x63, 0x74, 0x42, 0x75, 0x6e, 0x64, + 0x6c, 0x65, 0x56, 0x32, 0x48, 0x00, 0x52, 0x02, 0x76, 0x32, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0xd3, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x42, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, + 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, + 0x4d, 0x58, 0xaa, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, + 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0xe2, 0x02, 0x20, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_contact_proto_rawDescOnce sync.Once + file_message_contents_contact_proto_rawDescData = file_message_contents_contact_proto_rawDesc +) + +func file_message_contents_contact_proto_rawDescGZIP() []byte { + file_message_contents_contact_proto_rawDescOnce.Do(func() { + file_message_contents_contact_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_contact_proto_rawDescData) + }) + return file_message_contents_contact_proto_rawDescData +} + +var file_message_contents_contact_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_message_contents_contact_proto_goTypes = []interface{}{ + (*ContactBundleV1)(nil), // 0: xmtp.message_contents.ContactBundleV1 + (*ContactBundleV2)(nil), // 1: xmtp.message_contents.ContactBundleV2 + (*ContactBundle)(nil), // 2: xmtp.message_contents.ContactBundle + (*PublicKeyBundle)(nil), // 3: xmtp.message_contents.PublicKeyBundle + (*SignedPublicKeyBundle)(nil), // 4: xmtp.message_contents.SignedPublicKeyBundle +} +var file_message_contents_contact_proto_depIdxs = []int32{ + 3, // 0: xmtp.message_contents.ContactBundleV1.key_bundle:type_name -> xmtp.message_contents.PublicKeyBundle + 4, // 1: xmtp.message_contents.ContactBundleV2.key_bundle:type_name -> xmtp.message_contents.SignedPublicKeyBundle + 0, // 2: xmtp.message_contents.ContactBundle.v1:type_name -> xmtp.message_contents.ContactBundleV1 + 1, // 3: xmtp.message_contents.ContactBundle.v2:type_name -> xmtp.message_contents.ContactBundleV2 + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_message_contents_contact_proto_init() } +func file_message_contents_contact_proto_init() { + if File_message_contents_contact_proto != nil { + return + } + file_message_contents_public_key_proto_init() + if !protoimpl.UnsafeEnabled { + file_message_contents_contact_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContactBundleV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_contact_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContactBundleV2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_contact_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContactBundle); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_message_contents_contact_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*ContactBundle_V1)(nil), + (*ContactBundle_V2)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_contact_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_contact_proto_goTypes, + DependencyIndexes: file_message_contents_contact_proto_depIdxs, + MessageInfos: file_message_contents_contact_proto_msgTypes, + }.Build() + File_message_contents_contact_proto = out.File + file_message_contents_contact_proto_rawDesc = nil + file_message_contents_contact_proto_goTypes = nil + file_message_contents_contact_proto_depIdxs = nil +} diff --git a/pkg/proto/message_contents/content.pb.go b/pkg/proto/message_contents/content.pb.go new file mode 100644 index 00000000..d249abe0 --- /dev/null +++ b/pkg/proto/message_contents/content.pb.go @@ -0,0 +1,479 @@ +// Message content encoding structures + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/content.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Recognized compression algorithms +// protolint:disable ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH +type Compression int32 + +const ( + Compression_COMPRESSION_DEFLATE Compression = 0 + Compression_COMPRESSION_GZIP Compression = 1 +) + +// Enum value maps for Compression. +var ( + Compression_name = map[int32]string{ + 0: "COMPRESSION_DEFLATE", + 1: "COMPRESSION_GZIP", + } + Compression_value = map[string]int32{ + "COMPRESSION_DEFLATE": 0, + "COMPRESSION_GZIP": 1, + } +) + +func (x Compression) Enum() *Compression { + p := new(Compression) + *p = x + return p +} + +func (x Compression) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Compression) Descriptor() protoreflect.EnumDescriptor { + return file_message_contents_content_proto_enumTypes[0].Descriptor() +} + +func (Compression) Type() protoreflect.EnumType { + return &file_message_contents_content_proto_enumTypes[0] +} + +func (x Compression) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Compression.Descriptor instead. +func (Compression) EnumDescriptor() ([]byte, []int) { + return file_message_contents_content_proto_rawDescGZIP(), []int{0} +} + +// ContentTypeId is used to identify the type of content stored in a Message. +type ContentTypeId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AuthorityId string `protobuf:"bytes,1,opt,name=authority_id,json=authorityId,proto3" json:"authority_id,omitempty"` // authority governing this content type + TypeId string `protobuf:"bytes,2,opt,name=type_id,json=typeId,proto3" json:"type_id,omitempty"` // type identifier + VersionMajor uint32 `protobuf:"varint,3,opt,name=version_major,json=versionMajor,proto3" json:"version_major,omitempty"` // major version of the type + VersionMinor uint32 `protobuf:"varint,4,opt,name=version_minor,json=versionMinor,proto3" json:"version_minor,omitempty"` // minor version of the type +} + +func (x *ContentTypeId) Reset() { + *x = ContentTypeId{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_content_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContentTypeId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContentTypeId) ProtoMessage() {} + +func (x *ContentTypeId) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_content_proto_msgTypes[0] + 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 ContentTypeId.ProtoReflect.Descriptor instead. +func (*ContentTypeId) Descriptor() ([]byte, []int) { + return file_message_contents_content_proto_rawDescGZIP(), []int{0} +} + +func (x *ContentTypeId) GetAuthorityId() string { + if x != nil { + return x.AuthorityId + } + return "" +} + +func (x *ContentTypeId) GetTypeId() string { + if x != nil { + return x.TypeId + } + return "" +} + +func (x *ContentTypeId) GetVersionMajor() uint32 { + if x != nil { + return x.VersionMajor + } + return 0 +} + +func (x *ContentTypeId) GetVersionMinor() uint32 { + if x != nil { + return x.VersionMinor + } + return 0 +} + +// EncodedContent bundles the content with metadata identifying its type +// and parameters required for correct decoding and presentation of the content. +type EncodedContent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // content type identifier used to match the payload with + // the correct decoding machinery + Type *ContentTypeId `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // optional encoding parameters required to correctly decode the content + Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // optional fallback description of the content that can be used in case + // the client cannot decode or render the content + Fallback *string `protobuf:"bytes,3,opt,name=fallback,proto3,oneof" json:"fallback,omitempty"` + // optional compression; the value indicates algorithm used to + // compress the encoded content bytes + Compression *Compression `protobuf:"varint,5,opt,name=compression,proto3,enum=xmtp.message_contents.Compression,oneof" json:"compression,omitempty"` + // encoded content itself + Content []byte `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *EncodedContent) Reset() { + *x = EncodedContent{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_content_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncodedContent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncodedContent) ProtoMessage() {} + +func (x *EncodedContent) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_content_proto_msgTypes[1] + 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 EncodedContent.ProtoReflect.Descriptor instead. +func (*EncodedContent) Descriptor() ([]byte, []int) { + return file_message_contents_content_proto_rawDescGZIP(), []int{1} +} + +func (x *EncodedContent) GetType() *ContentTypeId { + if x != nil { + return x.Type + } + return nil +} + +func (x *EncodedContent) GetParameters() map[string]string { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *EncodedContent) GetFallback() string { + if x != nil && x.Fallback != nil { + return *x.Fallback + } + return "" +} + +func (x *EncodedContent) GetCompression() Compression { + if x != nil && x.Compression != nil { + return *x.Compression + } + return Compression_COMPRESSION_DEFLATE +} + +func (x *EncodedContent) GetContent() []byte { + if x != nil { + return x.Content + } + return nil +} + +// SignedContent attaches a signature to EncodedContent. +type SignedContent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MUST contain EncodedContent + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + Sender *SignedPublicKeyBundle `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + // 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 `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *SignedContent) Reset() { + *x = SignedContent{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_content_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedContent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedContent) ProtoMessage() {} + +func (x *SignedContent) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_content_proto_msgTypes[2] + 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 SignedContent.ProtoReflect.Descriptor instead. +func (*SignedContent) Descriptor() ([]byte, []int) { + return file_message_contents_content_proto_rawDescGZIP(), []int{2} +} + +func (x *SignedContent) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *SignedContent) GetSender() *SignedPublicKeyBundle { + if x != nil { + return x.Sender + } + return nil +} + +func (x *SignedContent) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + +var File_message_contents_content_proto protoreflect.FileDescriptor + +var file_message_contents_content_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x15, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x01, 0x0a, + 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x21, + 0x0a, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x49, + 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6a, 0x6f, 0x72, 0x12, + 0x23, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x6f, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, + 0x69, 0x6e, 0x6f, 0x72, 0x22, 0x83, 0x03, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 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, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6e, + 0x63, 0x6f, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x08, 0x66, 0x61, 0x6c, 0x6c, + 0x62, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x66, 0x61, + 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x88, 0x01, 0x01, 0x12, 0x49, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, + 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, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x3d, + 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0b, 0x0a, + 0x09, 0x5f, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, + 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xaf, 0x01, 0x0a, 0x0d, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x44, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x18, 0x02, 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, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 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, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2a, 0x3c, 0x0a, 0x0b, + 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x43, + 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x46, 0x4c, 0x41, + 0x54, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, + 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x5a, 0x49, 0x50, 0x10, 0x01, 0x42, 0xd3, 0x01, 0x0a, 0x19, 0x63, + 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, + 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, 0xaa, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, + 0x14, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x20, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x58, 0x6d, 0x74, 0x70, 0x3a, + 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_content_proto_rawDescOnce sync.Once + file_message_contents_content_proto_rawDescData = file_message_contents_content_proto_rawDesc +) + +func file_message_contents_content_proto_rawDescGZIP() []byte { + file_message_contents_content_proto_rawDescOnce.Do(func() { + file_message_contents_content_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_content_proto_rawDescData) + }) + return file_message_contents_content_proto_rawDescData +} + +var file_message_contents_content_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_message_contents_content_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_message_contents_content_proto_goTypes = []interface{}{ + (Compression)(0), // 0: xmtp.message_contents.Compression + (*ContentTypeId)(nil), // 1: xmtp.message_contents.ContentTypeId + (*EncodedContent)(nil), // 2: xmtp.message_contents.EncodedContent + (*SignedContent)(nil), // 3: xmtp.message_contents.SignedContent + nil, // 4: xmtp.message_contents.EncodedContent.ParametersEntry + (*SignedPublicKeyBundle)(nil), // 5: xmtp.message_contents.SignedPublicKeyBundle + (*Signature)(nil), // 6: xmtp.message_contents.Signature +} +var file_message_contents_content_proto_depIdxs = []int32{ + 1, // 0: xmtp.message_contents.EncodedContent.type:type_name -> xmtp.message_contents.ContentTypeId + 4, // 1: xmtp.message_contents.EncodedContent.parameters:type_name -> xmtp.message_contents.EncodedContent.ParametersEntry + 0, // 2: xmtp.message_contents.EncodedContent.compression:type_name -> xmtp.message_contents.Compression + 5, // 3: xmtp.message_contents.SignedContent.sender:type_name -> xmtp.message_contents.SignedPublicKeyBundle + 6, // 4: xmtp.message_contents.SignedContent.signature:type_name -> xmtp.message_contents.Signature + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_message_contents_content_proto_init() } +func file_message_contents_content_proto_init() { + if File_message_contents_content_proto != nil { + return + } + file_message_contents_public_key_proto_init() + file_message_contents_signature_proto_init() + if !protoimpl.UnsafeEnabled { + file_message_contents_content_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContentTypeId); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_content_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EncodedContent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_content_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedContent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_message_contents_content_proto_msgTypes[1].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_content_proto_rawDesc, + NumEnums: 1, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_content_proto_goTypes, + DependencyIndexes: file_message_contents_content_proto_depIdxs, + EnumInfos: file_message_contents_content_proto_enumTypes, + MessageInfos: file_message_contents_content_proto_msgTypes, + }.Build() + File_message_contents_content_proto = out.File + file_message_contents_content_proto_rawDesc = nil + file_message_contents_content_proto_goTypes = nil + file_message_contents_content_proto_depIdxs = nil +} diff --git a/pkg/proto/message_contents/conversation_reference.pb.go b/pkg/proto/message_contents/conversation_reference.pb.go new file mode 100644 index 00000000..36821966 --- /dev/null +++ b/pkg/proto/message_contents/conversation_reference.pb.go @@ -0,0 +1,199 @@ +// Holds the ConversationReference + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/conversation_reference.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A light pointer for a conversation that contains no decryption keys +type ConversationReference struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` + PeerAddress string `protobuf:"bytes,2,opt,name=peer_address,json=peerAddress,proto3" json:"peer_address,omitempty"` + CreatedNs uint64 `protobuf:"varint,3,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` + Context *InvitationV1_Context `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"` +} + +func (x *ConversationReference) Reset() { + *x = ConversationReference{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_conversation_reference_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConversationReference) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConversationReference) ProtoMessage() {} + +func (x *ConversationReference) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_conversation_reference_proto_msgTypes[0] + 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 ConversationReference.ProtoReflect.Descriptor instead. +func (*ConversationReference) Descriptor() ([]byte, []int) { + return file_message_contents_conversation_reference_proto_rawDescGZIP(), []int{0} +} + +func (x *ConversationReference) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +func (x *ConversationReference) GetPeerAddress() string { + if x != nil { + return x.PeerAddress + } + return "" +} + +func (x *ConversationReference) GetCreatedNs() uint64 { + if x != nil { + return x.CreatedNs + } + return 0 +} + +func (x *ConversationReference) GetContext() *InvitationV1_Context { + if x != nil { + return x.Context + } + return nil +} + +var File_message_contents_conversation_reference_proto protoreflect.FileDescriptor + +var file_message_contents_conversation_reference_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x15, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb6, 0x01, 0x0a, 0x15, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 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, 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, 0x12, 0x45, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 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, 0x42, 0xe1, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x42, 0x1a, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, 0xaa, 0x02, 0x14, + 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x20, 0x58, 0x6d, + 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x15, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_conversation_reference_proto_rawDescOnce sync.Once + file_message_contents_conversation_reference_proto_rawDescData = file_message_contents_conversation_reference_proto_rawDesc +) + +func file_message_contents_conversation_reference_proto_rawDescGZIP() []byte { + file_message_contents_conversation_reference_proto_rawDescOnce.Do(func() { + file_message_contents_conversation_reference_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_conversation_reference_proto_rawDescData) + }) + return file_message_contents_conversation_reference_proto_rawDescData +} + +var file_message_contents_conversation_reference_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_message_contents_conversation_reference_proto_goTypes = []interface{}{ + (*ConversationReference)(nil), // 0: xmtp.message_contents.ConversationReference + (*InvitationV1_Context)(nil), // 1: xmtp.message_contents.InvitationV1.Context +} +var file_message_contents_conversation_reference_proto_depIdxs = []int32{ + 1, // 0: xmtp.message_contents.ConversationReference.context:type_name -> xmtp.message_contents.InvitationV1.Context + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_message_contents_conversation_reference_proto_init() } +func file_message_contents_conversation_reference_proto_init() { + if File_message_contents_conversation_reference_proto != nil { + return + } + file_message_contents_invitation_proto_init() + if !protoimpl.UnsafeEnabled { + file_message_contents_conversation_reference_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConversationReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_conversation_reference_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_conversation_reference_proto_goTypes, + DependencyIndexes: file_message_contents_conversation_reference_proto_depIdxs, + MessageInfos: file_message_contents_conversation_reference_proto_msgTypes, + }.Build() + File_message_contents_conversation_reference_proto = out.File + file_message_contents_conversation_reference_proto_rawDesc = nil + file_message_contents_conversation_reference_proto_goTypes = nil + file_message_contents_conversation_reference_proto_depIdxs = nil +} diff --git a/pkg/proto/message_contents/ecies.pb.go b/pkg/proto/message_contents/ecies.pb.go new file mode 100644 index 00000000..233c80a6 --- /dev/null +++ b/pkg/proto/message_contents/ecies.pb.go @@ -0,0 +1,183 @@ +// ECIES is a wrapper for ECIES payloads + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/ecies.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// EciesMessage is a wrapper for ECIES encrypted payloads +type EciesMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *EciesMessage_V1 + Version isEciesMessage_Version `protobuf_oneof:"version"` +} + +func (x *EciesMessage) Reset() { + *x = EciesMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_ecies_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EciesMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EciesMessage) ProtoMessage() {} + +func (x *EciesMessage) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_ecies_proto_msgTypes[0] + 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 EciesMessage.ProtoReflect.Descriptor instead. +func (*EciesMessage) Descriptor() ([]byte, []int) { + return file_message_contents_ecies_proto_rawDescGZIP(), []int{0} +} + +func (m *EciesMessage) GetVersion() isEciesMessage_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *EciesMessage) GetV1() []byte { + if x, ok := x.GetVersion().(*EciesMessage_V1); ok { + return x.V1 + } + return nil +} + +type isEciesMessage_Version interface { + isEciesMessage_Version() +} + +type EciesMessage_V1 struct { + // Expected to be an ECIES encrypted SignedPayload + V1 []byte `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*EciesMessage_V1) isEciesMessage_Version() {} + +var File_message_contents_ecies_proto protoreflect.FileDescriptor + +var file_message_contents_ecies_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x65, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, + 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x2b, 0x0a, 0x0c, 0x45, 0x63, 0x69, 0x65, 0x73, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x42, 0xd1, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x42, 0x0a, 0x45, 0x63, 0x69, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, 0xaa, 0x02, 0x14, + 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x20, 0x58, 0x6d, + 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x15, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_ecies_proto_rawDescOnce sync.Once + file_message_contents_ecies_proto_rawDescData = file_message_contents_ecies_proto_rawDesc +) + +func file_message_contents_ecies_proto_rawDescGZIP() []byte { + file_message_contents_ecies_proto_rawDescOnce.Do(func() { + file_message_contents_ecies_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_ecies_proto_rawDescData) + }) + return file_message_contents_ecies_proto_rawDescData +} + +var file_message_contents_ecies_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_message_contents_ecies_proto_goTypes = []interface{}{ + (*EciesMessage)(nil), // 0: xmtp.message_contents.EciesMessage +} +var file_message_contents_ecies_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_message_contents_ecies_proto_init() } +func file_message_contents_ecies_proto_init() { + if File_message_contents_ecies_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_message_contents_ecies_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EciesMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_message_contents_ecies_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*EciesMessage_V1)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_ecies_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_ecies_proto_goTypes, + DependencyIndexes: file_message_contents_ecies_proto_depIdxs, + MessageInfos: file_message_contents_ecies_proto_msgTypes, + }.Build() + File_message_contents_ecies_proto = out.File + file_message_contents_ecies_proto_rawDesc = nil + file_message_contents_ecies_proto_goTypes = nil + file_message_contents_ecies_proto_depIdxs = nil +} diff --git a/pkg/proto/message_contents/invitation.pb.go b/pkg/proto/message_contents/invitation.pb.go new file mode 100644 index 00000000..92d9b81f --- /dev/null +++ b/pkg/proto/message_contents/invitation.pb.go @@ -0,0 +1,651 @@ +// Invitation is used by an initiator to invite participants +// into a new conversation. Invitation carries the chosen topic name +// and encryption scheme and key material to be used for message encryption. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/invitation.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Unsealed invitation V1 +type InvitationV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // topic name chosen for this conversation. + // It MUST be randomly generated bytes (length >= 32), + // then base64 encoded without padding + Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` + // A context object defining metadata + Context *InvitationV1_Context `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"` + // message encryption scheme and keys for this conversation. + // + // Types that are assignable to Encryption: + // + // *InvitationV1_Aes256GcmHkdfSha256 + Encryption isInvitationV1_Encryption `protobuf_oneof:"encryption"` +} + +func (x *InvitationV1) Reset() { + *x = InvitationV1{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_invitation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvitationV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvitationV1) ProtoMessage() {} + +func (x *InvitationV1) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_invitation_proto_msgTypes[0] + 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 InvitationV1.ProtoReflect.Descriptor instead. +func (*InvitationV1) Descriptor() ([]byte, []int) { + return file_message_contents_invitation_proto_rawDescGZIP(), []int{0} +} + +func (x *InvitationV1) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +func (x *InvitationV1) GetContext() *InvitationV1_Context { + if x != nil { + return x.Context + } + return nil +} + +func (m *InvitationV1) GetEncryption() isInvitationV1_Encryption { + if m != nil { + return m.Encryption + } + return nil +} + +func (x *InvitationV1) GetAes256GcmHkdfSha256() *InvitationV1_Aes256GcmHkdfsha256 { + if x, ok := x.GetEncryption().(*InvitationV1_Aes256GcmHkdfSha256); ok { + return x.Aes256GcmHkdfSha256 + } + return nil +} + +type isInvitationV1_Encryption interface { + isInvitationV1_Encryption() +} + +type InvitationV1_Aes256GcmHkdfSha256 struct { + // Specify the encryption method to process the key material properly. + Aes256GcmHkdfSha256 *InvitationV1_Aes256GcmHkdfsha256 `protobuf:"bytes,3,opt,name=aes256_gcm_hkdf_sha256,json=aes256GcmHkdfSha256,proto3,oneof"` +} + +func (*InvitationV1_Aes256GcmHkdfSha256) isInvitationV1_Encryption() {} + +// Sealed Invitation V1 Header +// Header carries information that is unencrypted, thus readable by the network +// it is however authenticated as associated data with the AEAD scheme used +// to encrypt the invitation body, thus providing tamper evidence. +type SealedInvitationHeaderV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sender *SignedPublicKeyBundle `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Recipient *SignedPublicKeyBundle `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + CreatedNs uint64 `protobuf:"varint,3,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` +} + +func (x *SealedInvitationHeaderV1) Reset() { + *x = SealedInvitationHeaderV1{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_invitation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SealedInvitationHeaderV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SealedInvitationHeaderV1) ProtoMessage() {} + +func (x *SealedInvitationHeaderV1) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_invitation_proto_msgTypes[1] + 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 SealedInvitationHeaderV1.ProtoReflect.Descriptor instead. +func (*SealedInvitationHeaderV1) Descriptor() ([]byte, []int) { + return file_message_contents_invitation_proto_rawDescGZIP(), []int{1} +} + +func (x *SealedInvitationHeaderV1) GetSender() *SignedPublicKeyBundle { + if x != nil { + return x.Sender + } + return nil +} + +func (x *SealedInvitationHeaderV1) GetRecipient() *SignedPublicKeyBundle { + if x != nil { + return x.Recipient + } + return nil +} + +func (x *SealedInvitationHeaderV1) GetCreatedNs() uint64 { + if x != nil { + return x.CreatedNs + } + return 0 +} + +// Sealed Invitation V1 +// Invitation encrypted with key material derived from the sender's and +// recipient's public key bundles using simplified X3DH where +// the sender's ephemeral key is replaced with sender's pre-key. +type SealedInvitationV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // encoded SealedInvitationHeaderV1 used as associated data for Ciphertext + HeaderBytes []byte `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` + // Ciphertext.payload MUST contain encrypted InvitationV1. + Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` +} + +func (x *SealedInvitationV1) Reset() { + *x = SealedInvitationV1{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_invitation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SealedInvitationV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SealedInvitationV1) ProtoMessage() {} + +func (x *SealedInvitationV1) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_invitation_proto_msgTypes[2] + 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 SealedInvitationV1.ProtoReflect.Descriptor instead. +func (*SealedInvitationV1) Descriptor() ([]byte, []int) { + return file_message_contents_invitation_proto_rawDescGZIP(), []int{2} +} + +func (x *SealedInvitationV1) GetHeaderBytes() []byte { + if x != nil { + return x.HeaderBytes + } + return nil +} + +func (x *SealedInvitationV1) GetCiphertext() *Ciphertext { + if x != nil { + return x.Ciphertext + } + return nil +} + +// Versioned Sealed Invitation +type SealedInvitation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *SealedInvitation_V1 + Version isSealedInvitation_Version `protobuf_oneof:"version"` +} + +func (x *SealedInvitation) Reset() { + *x = SealedInvitation{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_invitation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SealedInvitation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SealedInvitation) ProtoMessage() {} + +func (x *SealedInvitation) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_invitation_proto_msgTypes[3] + 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 SealedInvitation.ProtoReflect.Descriptor instead. +func (*SealedInvitation) Descriptor() ([]byte, []int) { + return file_message_contents_invitation_proto_rawDescGZIP(), []int{3} +} + +func (m *SealedInvitation) GetVersion() isSealedInvitation_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *SealedInvitation) GetV1() *SealedInvitationV1 { + if x, ok := x.GetVersion().(*SealedInvitation_V1); ok { + return x.V1 + } + return nil +} + +type isSealedInvitation_Version interface { + isSealedInvitation_Version() +} + +type SealedInvitation_V1 struct { + V1 *SealedInvitationV1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*SealedInvitation_V1) isSealedInvitation_Version() {} + +// Supported encryption schemes +// AES256-GCM-HKDF-SHA256 +type InvitationV1_Aes256GcmHkdfsha256 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyMaterial []byte `protobuf:"bytes,1,opt,name=key_material,json=keyMaterial,proto3" json:"key_material,omitempty"` // randomly generated key material (32 bytes) +} + +func (x *InvitationV1_Aes256GcmHkdfsha256) Reset() { + *x = InvitationV1_Aes256GcmHkdfsha256{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_invitation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvitationV1_Aes256GcmHkdfsha256) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvitationV1_Aes256GcmHkdfsha256) ProtoMessage() {} + +func (x *InvitationV1_Aes256GcmHkdfsha256) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_invitation_proto_msgTypes[4] + 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 InvitationV1_Aes256GcmHkdfsha256.ProtoReflect.Descriptor instead. +func (*InvitationV1_Aes256GcmHkdfsha256) Descriptor() ([]byte, []int) { + return file_message_contents_invitation_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *InvitationV1_Aes256GcmHkdfsha256) GetKeyMaterial() []byte { + if x != nil { + return x.KeyMaterial + } + return nil +} + +// The context type +type InvitationV1_Context struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Expected to be a URI (ie xmtp.org/convo1) + ConversationId string `protobuf:"bytes,1,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` + // Key value map of additional metadata that would be exposed to + // application developers and could be used for filtering + Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *InvitationV1_Context) Reset() { + *x = InvitationV1_Context{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_invitation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InvitationV1_Context) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvitationV1_Context) ProtoMessage() {} + +func (x *InvitationV1_Context) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_invitation_proto_msgTypes[5] + 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 InvitationV1_Context.ProtoReflect.Descriptor instead. +func (*InvitationV1_Context) Descriptor() ([]byte, []int) { + return file_message_contents_invitation_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *InvitationV1_Context) GetConversationId() string { + if x != nil { + return x.ConversationId + } + return "" +} + +func (x *InvitationV1_Context) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +var File_message_contents_invitation_proto protoreflect.FileDescriptor + +var file_message_contents_invitation_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x21, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x69, 0x70, + 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xec, 0x03, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, + 0x31, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x45, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x18, 0x02, 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, 0x6e, + 0x0a, 0x16, 0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x5f, 0x67, 0x63, 0x6d, 0x5f, 0x68, 0x6b, 0x64, + 0x66, 0x5f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, + 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, 0x41, 0x65, 0x73, 0x32, 0x35, 0x36, 0x67, 0x63, 0x6d, 0x48, 0x6b, 0x64, + 0x66, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x48, 0x00, 0x52, 0x13, 0x61, 0x65, 0x73, 0x32, 0x35, + 0x36, 0x47, 0x63, 0x6d, 0x48, 0x6b, 0x64, 0x66, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x1a, 0x38, + 0x0a, 0x13, 0x41, 0x65, 0x73, 0x32, 0x35, 0x36, 0x67, 0x63, 0x6d, 0x48, 0x6b, 0x64, 0x66, 0x73, + 0x68, 0x61, 0x32, 0x35, 0x36, 0x12, 0x21, 0x0a, 0x0c, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6b, 0x65, 0x79, + 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x1a, 0xc6, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x55, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x39, 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, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0xcb, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x31, 0x12, 0x44, 0x0a, 0x06, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 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, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, + 0x02, 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, 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, 0x7a, 0x0a, + 0x12, 0x53, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x56, 0x31, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, + 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0a, 0x63, + 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x22, 0x60, 0x0a, 0x10, 0x53, 0x65, 0x61, + 0x6c, 0x65, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x53, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x42, 0xd6, 0x01, 0x0a, 0x19, + 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x0f, 0x49, 0x6e, 0x76, 0x69, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, + 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, 0xaa, 0x02, 0x14, 0x58, 0x6d, + 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0xca, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x20, 0x58, 0x6d, 0x74, 0x70, + 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x58, + 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_invitation_proto_rawDescOnce sync.Once + file_message_contents_invitation_proto_rawDescData = file_message_contents_invitation_proto_rawDesc +) + +func file_message_contents_invitation_proto_rawDescGZIP() []byte { + file_message_contents_invitation_proto_rawDescOnce.Do(func() { + file_message_contents_invitation_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_invitation_proto_rawDescData) + }) + return file_message_contents_invitation_proto_rawDescData +} + +var file_message_contents_invitation_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_message_contents_invitation_proto_goTypes = []interface{}{ + (*InvitationV1)(nil), // 0: xmtp.message_contents.InvitationV1 + (*SealedInvitationHeaderV1)(nil), // 1: xmtp.message_contents.SealedInvitationHeaderV1 + (*SealedInvitationV1)(nil), // 2: xmtp.message_contents.SealedInvitationV1 + (*SealedInvitation)(nil), // 3: xmtp.message_contents.SealedInvitation + (*InvitationV1_Aes256GcmHkdfsha256)(nil), // 4: xmtp.message_contents.InvitationV1.Aes256gcmHkdfsha256 + (*InvitationV1_Context)(nil), // 5: xmtp.message_contents.InvitationV1.Context + nil, // 6: xmtp.message_contents.InvitationV1.Context.MetadataEntry + (*SignedPublicKeyBundle)(nil), // 7: xmtp.message_contents.SignedPublicKeyBundle + (*Ciphertext)(nil), // 8: xmtp.message_contents.Ciphertext +} +var file_message_contents_invitation_proto_depIdxs = []int32{ + 5, // 0: xmtp.message_contents.InvitationV1.context:type_name -> xmtp.message_contents.InvitationV1.Context + 4, // 1: xmtp.message_contents.InvitationV1.aes256_gcm_hkdf_sha256:type_name -> xmtp.message_contents.InvitationV1.Aes256gcmHkdfsha256 + 7, // 2: xmtp.message_contents.SealedInvitationHeaderV1.sender:type_name -> xmtp.message_contents.SignedPublicKeyBundle + 7, // 3: xmtp.message_contents.SealedInvitationHeaderV1.recipient:type_name -> xmtp.message_contents.SignedPublicKeyBundle + 8, // 4: xmtp.message_contents.SealedInvitationV1.ciphertext:type_name -> xmtp.message_contents.Ciphertext + 2, // 5: xmtp.message_contents.SealedInvitation.v1:type_name -> xmtp.message_contents.SealedInvitationV1 + 6, // 6: xmtp.message_contents.InvitationV1.Context.metadata:type_name -> xmtp.message_contents.InvitationV1.Context.MetadataEntry + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_message_contents_invitation_proto_init() } +func file_message_contents_invitation_proto_init() { + if File_message_contents_invitation_proto != nil { + return + } + file_message_contents_ciphertext_proto_init() + file_message_contents_public_key_proto_init() + if !protoimpl.UnsafeEnabled { + file_message_contents_invitation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvitationV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_invitation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SealedInvitationHeaderV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_invitation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SealedInvitationV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_invitation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SealedInvitation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_invitation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvitationV1_Aes256GcmHkdfsha256); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_invitation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvitationV1_Context); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_message_contents_invitation_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*InvitationV1_Aes256GcmHkdfSha256)(nil), + } + file_message_contents_invitation_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*SealedInvitation_V1)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_invitation_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_invitation_proto_goTypes, + DependencyIndexes: file_message_contents_invitation_proto_depIdxs, + MessageInfos: file_message_contents_invitation_proto_msgTypes, + }.Build() + File_message_contents_invitation_proto = out.File + file_message_contents_invitation_proto_rawDesc = nil + file_message_contents_invitation_proto_goTypes = nil + file_message_contents_invitation_proto_depIdxs = nil +} diff --git a/pkg/proto/message_contents/message.pb.go b/pkg/proto/message_contents/message.pb.go new file mode 100644 index 00000000..75d387ea --- /dev/null +++ b/pkg/proto/message_contents/message.pb.go @@ -0,0 +1,688 @@ +// Messages used for transport and storage of user conversations. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/message.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Message header is encoded separately as the bytes are also used +// as associated data for authenticated encryption +type MessageHeaderV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Sender *PublicKeyBundle `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Recipient *PublicKeyBundle `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *MessageHeaderV1) Reset() { + *x = MessageHeaderV1{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessageHeaderV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageHeaderV1) ProtoMessage() {} + +func (x *MessageHeaderV1) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_message_proto_msgTypes[0] + 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 MessageHeaderV1.ProtoReflect.Descriptor instead. +func (*MessageHeaderV1) Descriptor() ([]byte, []int) { + return file_message_contents_message_proto_rawDescGZIP(), []int{0} +} + +func (x *MessageHeaderV1) GetSender() *PublicKeyBundle { + if x != nil { + return x.Sender + } + return nil +} + +func (x *MessageHeaderV1) GetRecipient() *PublicKeyBundle { + if x != nil { + return x.Recipient + } + return nil +} + +func (x *MessageHeaderV1) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +// Message is the top level protocol element +type MessageV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HeaderBytes []byte `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` // encapsulates encoded MessageHeaderV1 + // Ciphertext.payload MUST contain encrypted EncodedContent + Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` +} + +func (x *MessageV1) Reset() { + *x = MessageV1{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_message_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessageV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageV1) ProtoMessage() {} + +func (x *MessageV1) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_message_proto_msgTypes[1] + 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 MessageV1.ProtoReflect.Descriptor instead. +func (*MessageV1) Descriptor() ([]byte, []int) { + return file_message_contents_message_proto_rawDescGZIP(), []int{1} +} + +func (x *MessageV1) GetHeaderBytes() []byte { + if x != nil { + return x.HeaderBytes + } + return nil +} + +func (x *MessageV1) GetCiphertext() *Ciphertext { + if x != nil { + return x.Ciphertext + } + return nil +} + +// Message header carries information that is not encrypted, and is therefore +// observable by the network. It is however authenticated as associated data +// of the AEAD encryption used to protect the message, +// thus providing tamper evidence. +type MessageHeaderV2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // sender specified message creation time + CreatedNs uint64 `protobuf:"varint,1,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` + // the topic the message belongs to + Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"` +} + +func (x *MessageHeaderV2) Reset() { + *x = MessageHeaderV2{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_message_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessageHeaderV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageHeaderV2) ProtoMessage() {} + +func (x *MessageHeaderV2) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_message_proto_msgTypes[2] + 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 MessageHeaderV2.ProtoReflect.Descriptor instead. +func (*MessageHeaderV2) Descriptor() ([]byte, []int) { + return file_message_contents_message_proto_rawDescGZIP(), []int{2} +} + +func (x *MessageHeaderV2) GetCreatedNs() uint64 { + if x != nil { + return x.CreatedNs + } + return 0 +} + +func (x *MessageHeaderV2) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +// Message combines the encoded header with the encrypted payload. +type MessageV2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HeaderBytes []byte `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` // encapsulates encoded MessageHeaderV2 + // Ciphertext.payload MUST contain encrypted SignedContent + Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` +} + +func (x *MessageV2) Reset() { + *x = MessageV2{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_message_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessageV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageV2) ProtoMessage() {} + +func (x *MessageV2) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_message_proto_msgTypes[3] + 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 MessageV2.ProtoReflect.Descriptor instead. +func (*MessageV2) Descriptor() ([]byte, []int) { + return file_message_contents_message_proto_rawDescGZIP(), []int{3} +} + +func (x *MessageV2) GetHeaderBytes() []byte { + if x != nil { + return x.HeaderBytes + } + return nil +} + +func (x *MessageV2) GetCiphertext() *Ciphertext { + if x != nil { + return x.Ciphertext + } + return nil +} + +// Versioned Message +type Message struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *Message_V1 + // *Message_V2 + Version isMessage_Version `protobuf_oneof:"version"` +} + +func (x *Message) Reset() { + *x = Message{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_message_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Message) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message) ProtoMessage() {} + +func (x *Message) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_message_proto_msgTypes[4] + 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 Message.ProtoReflect.Descriptor instead. +func (*Message) Descriptor() ([]byte, []int) { + return file_message_contents_message_proto_rawDescGZIP(), []int{4} +} + +func (m *Message) GetVersion() isMessage_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *Message) GetV1() *MessageV1 { + if x, ok := x.GetVersion().(*Message_V1); ok { + return x.V1 + } + return nil +} + +func (x *Message) GetV2() *MessageV2 { + if x, ok := x.GetVersion().(*Message_V2); ok { + return x.V2 + } + return nil +} + +type isMessage_Version interface { + isMessage_Version() +} + +type Message_V1 struct { + V1 *MessageV1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +type Message_V2 struct { + V2 *MessageV2 `protobuf:"bytes,2,opt,name=v2,proto3,oneof"` +} + +func (*Message_V1) isMessage_Version() {} + +func (*Message_V2) isMessage_Version() {} + +// DecodedMessage represents the decrypted message contents. +// DecodedMessage instances are not stored on the network, but +// may be serialized and stored by clients +type DecodedMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + MessageVersion string `protobuf:"bytes,2,opt,name=message_version,json=messageVersion,proto3" json:"message_version,omitempty"` + SenderAddress string `protobuf:"bytes,3,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + RecipientAddress *string `protobuf:"bytes,4,opt,name=recipient_address,json=recipientAddress,proto3,oneof" json:"recipient_address,omitempty"` + SentNs uint64 `protobuf:"varint,5,opt,name=sent_ns,json=sentNs,proto3" json:"sent_ns,omitempty"` + ContentTopic string `protobuf:"bytes,6,opt,name=content_topic,json=contentTopic,proto3" json:"content_topic,omitempty"` + Conversation *ConversationReference `protobuf:"bytes,7,opt,name=conversation,proto3" json:"conversation,omitempty"` + ContentBytes []byte `protobuf:"bytes,8,opt,name=content_bytes,json=contentBytes,proto3" json:"content_bytes,omitempty"` // encapsulates EncodedContent +} + +func (x *DecodedMessage) Reset() { + *x = DecodedMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_message_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DecodedMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecodedMessage) ProtoMessage() {} + +func (x *DecodedMessage) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_message_proto_msgTypes[5] + 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 DecodedMessage.ProtoReflect.Descriptor instead. +func (*DecodedMessage) Descriptor() ([]byte, []int) { + return file_message_contents_message_proto_rawDescGZIP(), []int{5} +} + +func (x *DecodedMessage) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DecodedMessage) GetMessageVersion() string { + if x != nil { + return x.MessageVersion + } + return "" +} + +func (x *DecodedMessage) GetSenderAddress() string { + if x != nil { + return x.SenderAddress + } + return "" +} + +func (x *DecodedMessage) GetRecipientAddress() string { + if x != nil && x.RecipientAddress != nil { + return *x.RecipientAddress + } + return "" +} + +func (x *DecodedMessage) GetSentNs() uint64 { + if x != nil { + return x.SentNs + } + return 0 +} + +func (x *DecodedMessage) GetContentTopic() string { + if x != nil { + return x.ContentTopic + } + return "" +} + +func (x *DecodedMessage) GetConversation() *ConversationReference { + if x != nil { + return x.Conversation + } + return nil +} + +func (x *DecodedMessage) GetContentBytes() []byte { + if x != nil { + return x.ContentBytes + } + return nil +} + +var File_message_contents_message_proto protoreflect.FileDescriptor + +var file_message_contents_message_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x15, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, + 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x01, 0x0a, + 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x31, + 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x12, 0x44, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 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, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x22, 0x71, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x56, + 0x31, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, + 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0a, 0x63, 0x69, 0x70, + 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x22, 0x46, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x32, 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, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, + 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x22, + 0x71, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x56, 0x32, 0x12, 0x21, 0x0a, 0x0c, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x41, 0x0a, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x69, 0x70, 0x68, + 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, + 0x78, 0x74, 0x22, 0x7c, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, + 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, + 0x31, 0x12, 0x32, 0x0a, 0x02, 0x76, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x56, 0x32, 0x48, + 0x00, 0x52, 0x02, 0x76, 0x32, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0xed, 0x02, 0x0a, 0x0e, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x11, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x10, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x88, 0x01, 0x01, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x4e, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x6f, + 0x70, 0x69, 0x63, 0x12, 0x50, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x07, 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, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x72, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x42, 0xd3, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x0c, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, 0xaa, 0x02, 0x14, + 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x20, 0x58, 0x6d, + 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x15, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_message_proto_rawDescOnce sync.Once + file_message_contents_message_proto_rawDescData = file_message_contents_message_proto_rawDesc +) + +func file_message_contents_message_proto_rawDescGZIP() []byte { + file_message_contents_message_proto_rawDescOnce.Do(func() { + file_message_contents_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_message_proto_rawDescData) + }) + return file_message_contents_message_proto_rawDescData +} + +var file_message_contents_message_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_message_contents_message_proto_goTypes = []interface{}{ + (*MessageHeaderV1)(nil), // 0: xmtp.message_contents.MessageHeaderV1 + (*MessageV1)(nil), // 1: xmtp.message_contents.MessageV1 + (*MessageHeaderV2)(nil), // 2: xmtp.message_contents.MessageHeaderV2 + (*MessageV2)(nil), // 3: xmtp.message_contents.MessageV2 + (*Message)(nil), // 4: xmtp.message_contents.Message + (*DecodedMessage)(nil), // 5: xmtp.message_contents.DecodedMessage + (*PublicKeyBundle)(nil), // 6: xmtp.message_contents.PublicKeyBundle + (*Ciphertext)(nil), // 7: xmtp.message_contents.Ciphertext + (*ConversationReference)(nil), // 8: xmtp.message_contents.ConversationReference +} +var file_message_contents_message_proto_depIdxs = []int32{ + 6, // 0: xmtp.message_contents.MessageHeaderV1.sender:type_name -> xmtp.message_contents.PublicKeyBundle + 6, // 1: xmtp.message_contents.MessageHeaderV1.recipient:type_name -> xmtp.message_contents.PublicKeyBundle + 7, // 2: xmtp.message_contents.MessageV1.ciphertext:type_name -> xmtp.message_contents.Ciphertext + 7, // 3: xmtp.message_contents.MessageV2.ciphertext:type_name -> xmtp.message_contents.Ciphertext + 1, // 4: xmtp.message_contents.Message.v1:type_name -> xmtp.message_contents.MessageV1 + 3, // 5: xmtp.message_contents.Message.v2:type_name -> xmtp.message_contents.MessageV2 + 8, // 6: xmtp.message_contents.DecodedMessage.conversation:type_name -> xmtp.message_contents.ConversationReference + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_message_contents_message_proto_init() } +func file_message_contents_message_proto_init() { + if File_message_contents_message_proto != nil { + return + } + file_message_contents_ciphertext_proto_init() + file_message_contents_conversation_reference_proto_init() + file_message_contents_public_key_proto_init() + if !protoimpl.UnsafeEnabled { + file_message_contents_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessageHeaderV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessageV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessageHeaderV2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_message_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessageV2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Message); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_message_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DecodedMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_message_contents_message_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*Message_V1)(nil), + (*Message_V2)(nil), + } + file_message_contents_message_proto_msgTypes[5].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_message_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_message_proto_goTypes, + DependencyIndexes: file_message_contents_message_proto_depIdxs, + MessageInfos: file_message_contents_message_proto_msgTypes, + }.Build() + File_message_contents_message_proto = out.File + file_message_contents_message_proto_rawDesc = nil + file_message_contents_message_proto_goTypes = nil + file_message_contents_message_proto_depIdxs = nil +} diff --git a/pkg/proto/message_contents/private_key.pb.go b/pkg/proto/message_contents/private_key.pb.go new file mode 100644 index 00000000..7ae8216e --- /dev/null +++ b/pkg/proto/message_contents/private_key.pb.go @@ -0,0 +1,925 @@ +// Private Key Storage +// +// Following definitions are not used in the protocol, instead +// they provide a way for encoding private keys for storage. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/private_key.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// PrivateKey generalized to support different key types +type SignedPrivateKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // time the key was created + CreatedNs uint64 `protobuf:"varint,1,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` + // private key + // + // Types that are assignable to Union: + // + // *SignedPrivateKey_Secp256K1_ + Union isSignedPrivateKey_Union `protobuf_oneof:"union"` + // public key for this private key + PublicKey *SignedPublicKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` +} + +func (x *SignedPrivateKey) Reset() { + *x = SignedPrivateKey{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_key_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedPrivateKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedPrivateKey) ProtoMessage() {} + +func (x *SignedPrivateKey) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_key_proto_msgTypes[0] + 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 SignedPrivateKey.ProtoReflect.Descriptor instead. +func (*SignedPrivateKey) Descriptor() ([]byte, []int) { + return file_message_contents_private_key_proto_rawDescGZIP(), []int{0} +} + +func (x *SignedPrivateKey) GetCreatedNs() uint64 { + if x != nil { + return x.CreatedNs + } + return 0 +} + +func (m *SignedPrivateKey) GetUnion() isSignedPrivateKey_Union { + if m != nil { + return m.Union + } + return nil +} + +func (x *SignedPrivateKey) GetSecp256K1() *SignedPrivateKey_Secp256K1 { + if x, ok := x.GetUnion().(*SignedPrivateKey_Secp256K1_); ok { + return x.Secp256K1 + } + return nil +} + +func (x *SignedPrivateKey) GetPublicKey() *SignedPublicKey { + if x != nil { + return x.PublicKey + } + return nil +} + +type isSignedPrivateKey_Union interface { + isSignedPrivateKey_Union() +} + +type SignedPrivateKey_Secp256K1_ struct { + Secp256K1 *SignedPrivateKey_Secp256K1 `protobuf:"bytes,2,opt,name=secp256k1,proto3,oneof"` +} + +func (*SignedPrivateKey_Secp256K1_) isSignedPrivateKey_Union() {} + +// PrivateKeyBundle wraps the identityKey and the preKeys, +// enforces usage of signed keys. +type PrivateKeyBundleV2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IdentityKey *SignedPrivateKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` + // all the known pre-keys, newer keys first, + PreKeys []*SignedPrivateKey `protobuf:"bytes,2,rep,name=pre_keys,json=preKeys,proto3" json:"pre_keys,omitempty"` +} + +func (x *PrivateKeyBundleV2) Reset() { + *x = PrivateKeyBundleV2{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_key_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivateKeyBundleV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateKeyBundleV2) ProtoMessage() {} + +func (x *PrivateKeyBundleV2) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_key_proto_msgTypes[1] + 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 PrivateKeyBundleV2.ProtoReflect.Descriptor instead. +func (*PrivateKeyBundleV2) Descriptor() ([]byte, []int) { + return file_message_contents_private_key_proto_rawDescGZIP(), []int{1} +} + +func (x *PrivateKeyBundleV2) GetIdentityKey() *SignedPrivateKey { + if x != nil { + return x.IdentityKey + } + return nil +} + +func (x *PrivateKeyBundleV2) GetPreKeys() []*SignedPrivateKey { + if x != nil { + return x.PreKeys + } + return nil +} + +// LEGACY: PrivateKey generalized to support different key types +type PrivateKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // time the key was created + Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // private key + // + // Types that are assignable to Union: + // + // *PrivateKey_Secp256K1_ + Union isPrivateKey_Union `protobuf_oneof:"union"` + // public key for this private key + PublicKey *PublicKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` +} + +func (x *PrivateKey) Reset() { + *x = PrivateKey{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_key_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivateKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateKey) ProtoMessage() {} + +func (x *PrivateKey) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_key_proto_msgTypes[2] + 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 PrivateKey.ProtoReflect.Descriptor instead. +func (*PrivateKey) Descriptor() ([]byte, []int) { + return file_message_contents_private_key_proto_rawDescGZIP(), []int{2} +} + +func (x *PrivateKey) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (m *PrivateKey) GetUnion() isPrivateKey_Union { + if m != nil { + return m.Union + } + return nil +} + +func (x *PrivateKey) GetSecp256K1() *PrivateKey_Secp256K1 { + if x, ok := x.GetUnion().(*PrivateKey_Secp256K1_); ok { + return x.Secp256K1 + } + return nil +} + +func (x *PrivateKey) GetPublicKey() *PublicKey { + if x != nil { + return x.PublicKey + } + return nil +} + +type isPrivateKey_Union interface { + isPrivateKey_Union() +} + +type PrivateKey_Secp256K1_ struct { + Secp256K1 *PrivateKey_Secp256K1 `protobuf:"bytes,2,opt,name=secp256k1,proto3,oneof"` +} + +func (*PrivateKey_Secp256K1_) isPrivateKey_Union() {} + +// LEGACY: PrivateKeyBundleV1 wraps the identityKey and the preKeys +type PrivateKeyBundleV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IdentityKey *PrivateKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` + // all the known pre-keys, newer keys first, + PreKeys []*PrivateKey `protobuf:"bytes,2,rep,name=pre_keys,json=preKeys,proto3" json:"pre_keys,omitempty"` +} + +func (x *PrivateKeyBundleV1) Reset() { + *x = PrivateKeyBundleV1{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_key_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivateKeyBundleV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateKeyBundleV1) ProtoMessage() {} + +func (x *PrivateKeyBundleV1) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_key_proto_msgTypes[3] + 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 PrivateKeyBundleV1.ProtoReflect.Descriptor instead. +func (*PrivateKeyBundleV1) Descriptor() ([]byte, []int) { + return file_message_contents_private_key_proto_rawDescGZIP(), []int{3} +} + +func (x *PrivateKeyBundleV1) GetIdentityKey() *PrivateKey { + if x != nil { + return x.IdentityKey + } + return nil +} + +func (x *PrivateKeyBundleV1) GetPreKeys() []*PrivateKey { + if x != nil { + return x.PreKeys + } + return nil +} + +// Versioned PrivateKeyBundle +type PrivateKeyBundle struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *PrivateKeyBundle_V1 + // *PrivateKeyBundle_V2 + Version isPrivateKeyBundle_Version `protobuf_oneof:"version"` +} + +func (x *PrivateKeyBundle) Reset() { + *x = PrivateKeyBundle{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_key_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivateKeyBundle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateKeyBundle) ProtoMessage() {} + +func (x *PrivateKeyBundle) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_key_proto_msgTypes[4] + 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 PrivateKeyBundle.ProtoReflect.Descriptor instead. +func (*PrivateKeyBundle) Descriptor() ([]byte, []int) { + return file_message_contents_private_key_proto_rawDescGZIP(), []int{4} +} + +func (m *PrivateKeyBundle) GetVersion() isPrivateKeyBundle_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *PrivateKeyBundle) GetV1() *PrivateKeyBundleV1 { + if x, ok := x.GetVersion().(*PrivateKeyBundle_V1); ok { + return x.V1 + } + return nil +} + +func (x *PrivateKeyBundle) GetV2() *PrivateKeyBundleV2 { + if x, ok := x.GetVersion().(*PrivateKeyBundle_V2); ok { + return x.V2 + } + return nil +} + +type isPrivateKeyBundle_Version interface { + isPrivateKeyBundle_Version() +} + +type PrivateKeyBundle_V1 struct { + V1 *PrivateKeyBundleV1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +type PrivateKeyBundle_V2 struct { + V2 *PrivateKeyBundleV2 `protobuf:"bytes,2,opt,name=v2,proto3,oneof"` +} + +func (*PrivateKeyBundle_V1) isPrivateKeyBundle_Version() {} + +func (*PrivateKeyBundle_V2) isPrivateKeyBundle_Version() {} + +// PrivateKeyBundle encrypted with key material generated by +// signing a randomly generated "pre-key" with the user's wallet, +// i.e. EIP-191 signature of a "storage signature" message with +// the pre-key embedded in it. +// (see xmtp-js::PrivateKeyBundle.toEncryptedBytes for details) +type EncryptedPrivateKeyBundleV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // randomly generated pre-key + WalletPreKey []byte `protobuf:"bytes,1,opt,name=wallet_pre_key,json=walletPreKey,proto3" json:"wallet_pre_key,omitempty"` // 32 bytes + // MUST contain encrypted PrivateKeyBundle + Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` +} + +func (x *EncryptedPrivateKeyBundleV1) Reset() { + *x = EncryptedPrivateKeyBundleV1{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_key_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncryptedPrivateKeyBundleV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncryptedPrivateKeyBundleV1) ProtoMessage() {} + +func (x *EncryptedPrivateKeyBundleV1) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_key_proto_msgTypes[5] + 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 EncryptedPrivateKeyBundleV1.ProtoReflect.Descriptor instead. +func (*EncryptedPrivateKeyBundleV1) Descriptor() ([]byte, []int) { + return file_message_contents_private_key_proto_rawDescGZIP(), []int{5} +} + +func (x *EncryptedPrivateKeyBundleV1) GetWalletPreKey() []byte { + if x != nil { + return x.WalletPreKey + } + return nil +} + +func (x *EncryptedPrivateKeyBundleV1) GetCiphertext() *Ciphertext { + if x != nil { + return x.Ciphertext + } + return nil +} + +// Versioned encrypted PrivateKeyBundle +type EncryptedPrivateKeyBundle struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *EncryptedPrivateKeyBundle_V1 + Version isEncryptedPrivateKeyBundle_Version `protobuf_oneof:"version"` +} + +func (x *EncryptedPrivateKeyBundle) Reset() { + *x = EncryptedPrivateKeyBundle{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_key_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncryptedPrivateKeyBundle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncryptedPrivateKeyBundle) ProtoMessage() {} + +func (x *EncryptedPrivateKeyBundle) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_key_proto_msgTypes[6] + 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 EncryptedPrivateKeyBundle.ProtoReflect.Descriptor instead. +func (*EncryptedPrivateKeyBundle) Descriptor() ([]byte, []int) { + return file_message_contents_private_key_proto_rawDescGZIP(), []int{6} +} + +func (m *EncryptedPrivateKeyBundle) GetVersion() isEncryptedPrivateKeyBundle_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *EncryptedPrivateKeyBundle) GetV1() *EncryptedPrivateKeyBundleV1 { + if x, ok := x.GetVersion().(*EncryptedPrivateKeyBundle_V1); ok { + return x.V1 + } + return nil +} + +type isEncryptedPrivateKeyBundle_Version interface { + isEncryptedPrivateKeyBundle_Version() +} + +type EncryptedPrivateKeyBundle_V1 struct { + V1 *EncryptedPrivateKeyBundleV1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*EncryptedPrivateKeyBundle_V1) isEncryptedPrivateKeyBundle_Version() {} + +// EC: SECP256k1 +type SignedPrivateKey_Secp256K1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` // D big-endian, 32 bytes +} + +func (x *SignedPrivateKey_Secp256K1) Reset() { + *x = SignedPrivateKey_Secp256K1{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_key_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedPrivateKey_Secp256K1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedPrivateKey_Secp256K1) ProtoMessage() {} + +func (x *SignedPrivateKey_Secp256K1) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_key_proto_msgTypes[7] + 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 SignedPrivateKey_Secp256K1.ProtoReflect.Descriptor instead. +func (*SignedPrivateKey_Secp256K1) Descriptor() ([]byte, []int) { + return file_message_contents_private_key_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *SignedPrivateKey_Secp256K1) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +// EC: SECP256k1 +type PrivateKey_Secp256K1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` // D big-endian, 32 bytes +} + +func (x *PrivateKey_Secp256K1) Reset() { + *x = PrivateKey_Secp256K1{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_key_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivateKey_Secp256K1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateKey_Secp256K1) ProtoMessage() {} + +func (x *PrivateKey_Secp256K1) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_key_proto_msgTypes[8] + 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 PrivateKey_Secp256K1.ProtoReflect.Descriptor instead. +func (*PrivateKey_Secp256K1) Descriptor() ([]byte, []int) { + return file_message_contents_private_key_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *PrivateKey_Secp256K1) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +var File_message_contents_private_key_proto protoreflect.FileDescriptor + +var file_message_contents_private_key_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x21, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x69, + 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xf7, 0x01, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 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, 0x51, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, + 0x6b, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 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, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x2e, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x48, 0x00, 0x52, 0x09, 0x73, + 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 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, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x1a, + 0x21, 0x0a, 0x09, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x12, 0x14, 0x0a, 0x05, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x22, 0xa4, 0x01, 0x0a, 0x12, + 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x56, 0x32, 0x12, 0x4a, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 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, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x42, + 0x0a, 0x08, 0x70, 0x72, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 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, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x07, 0x70, 0x72, 0x65, 0x4b, 0x65, + 0x79, 0x73, 0x22, 0xe4, 0x01, 0x0a, 0x0a, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x4b, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x18, 0x02, 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, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x2e, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x48, + 0x00, 0x52, 0x09, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x12, 0x3f, 0x0a, 0x0a, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x1a, 0x21, 0x0a, + 0x09, 0x53, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x42, 0x07, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0x01, 0x0a, 0x12, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x56, 0x31, + 0x12, 0x44, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 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, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x5f, 0x6b, 0x65, + 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 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, 0x52, 0x07, 0x70, 0x72, 0x65, + 0x4b, 0x65, 0x79, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x10, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 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, 0x12, 0x3b, 0x0a, 0x02, 0x76, 0x32, 0x18, 0x02, 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, 0x32, 0x48, 0x00, 0x52, + 0x02, 0x76, 0x32, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4a, 0x04, + 0x08, 0x03, 0x10, 0x04, 0x22, 0x86, 0x01, 0x0a, 0x1b, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, + 0x6c, 0x65, 0x56, 0x31, 0x12, 0x24, 0x0a, 0x0e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x70, + 0x72, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x50, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x41, 0x0a, 0x0a, 0x63, 0x69, + 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, + 0x74, 0x52, 0x0a, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, 0x22, 0x6c, 0x0a, + 0x19, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x44, 0x0a, 0x02, 0x76, 0x31, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 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, 0x09, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0xd6, 0x01, 0x0a, 0x19, + 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x0f, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, + 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, 0xaa, 0x02, 0x14, 0x58, 0x6d, + 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0xca, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x20, 0x58, 0x6d, 0x74, 0x70, + 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x58, + 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_private_key_proto_rawDescOnce sync.Once + file_message_contents_private_key_proto_rawDescData = file_message_contents_private_key_proto_rawDesc +) + +func file_message_contents_private_key_proto_rawDescGZIP() []byte { + file_message_contents_private_key_proto_rawDescOnce.Do(func() { + file_message_contents_private_key_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_private_key_proto_rawDescData) + }) + return file_message_contents_private_key_proto_rawDescData +} + +var file_message_contents_private_key_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_message_contents_private_key_proto_goTypes = []interface{}{ + (*SignedPrivateKey)(nil), // 0: xmtp.message_contents.SignedPrivateKey + (*PrivateKeyBundleV2)(nil), // 1: xmtp.message_contents.PrivateKeyBundleV2 + (*PrivateKey)(nil), // 2: xmtp.message_contents.PrivateKey + (*PrivateKeyBundleV1)(nil), // 3: xmtp.message_contents.PrivateKeyBundleV1 + (*PrivateKeyBundle)(nil), // 4: xmtp.message_contents.PrivateKeyBundle + (*EncryptedPrivateKeyBundleV1)(nil), // 5: xmtp.message_contents.EncryptedPrivateKeyBundleV1 + (*EncryptedPrivateKeyBundle)(nil), // 6: xmtp.message_contents.EncryptedPrivateKeyBundle + (*SignedPrivateKey_Secp256K1)(nil), // 7: xmtp.message_contents.SignedPrivateKey.Secp256k1 + (*PrivateKey_Secp256K1)(nil), // 8: xmtp.message_contents.PrivateKey.Secp256k1 + (*SignedPublicKey)(nil), // 9: xmtp.message_contents.SignedPublicKey + (*PublicKey)(nil), // 10: xmtp.message_contents.PublicKey + (*Ciphertext)(nil), // 11: xmtp.message_contents.Ciphertext +} +var file_message_contents_private_key_proto_depIdxs = []int32{ + 7, // 0: xmtp.message_contents.SignedPrivateKey.secp256k1:type_name -> xmtp.message_contents.SignedPrivateKey.Secp256k1 + 9, // 1: xmtp.message_contents.SignedPrivateKey.public_key:type_name -> xmtp.message_contents.SignedPublicKey + 0, // 2: xmtp.message_contents.PrivateKeyBundleV2.identity_key:type_name -> xmtp.message_contents.SignedPrivateKey + 0, // 3: xmtp.message_contents.PrivateKeyBundleV2.pre_keys:type_name -> xmtp.message_contents.SignedPrivateKey + 8, // 4: xmtp.message_contents.PrivateKey.secp256k1:type_name -> xmtp.message_contents.PrivateKey.Secp256k1 + 10, // 5: xmtp.message_contents.PrivateKey.public_key:type_name -> xmtp.message_contents.PublicKey + 2, // 6: xmtp.message_contents.PrivateKeyBundleV1.identity_key:type_name -> xmtp.message_contents.PrivateKey + 2, // 7: xmtp.message_contents.PrivateKeyBundleV1.pre_keys:type_name -> xmtp.message_contents.PrivateKey + 3, // 8: xmtp.message_contents.PrivateKeyBundle.v1:type_name -> xmtp.message_contents.PrivateKeyBundleV1 + 1, // 9: xmtp.message_contents.PrivateKeyBundle.v2:type_name -> xmtp.message_contents.PrivateKeyBundleV2 + 11, // 10: xmtp.message_contents.EncryptedPrivateKeyBundleV1.ciphertext:type_name -> xmtp.message_contents.Ciphertext + 5, // 11: xmtp.message_contents.EncryptedPrivateKeyBundle.v1:type_name -> xmtp.message_contents.EncryptedPrivateKeyBundleV1 + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_message_contents_private_key_proto_init() } +func file_message_contents_private_key_proto_init() { + if File_message_contents_private_key_proto != nil { + return + } + file_message_contents_ciphertext_proto_init() + file_message_contents_public_key_proto_init() + if !protoimpl.UnsafeEnabled { + file_message_contents_private_key_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedPrivateKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_private_key_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivateKeyBundleV2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_private_key_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivateKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_private_key_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivateKeyBundleV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_private_key_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivateKeyBundle); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_private_key_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EncryptedPrivateKeyBundleV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_private_key_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EncryptedPrivateKeyBundle); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_private_key_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedPrivateKey_Secp256K1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_private_key_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivateKey_Secp256K1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_message_contents_private_key_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*SignedPrivateKey_Secp256K1_)(nil), + } + file_message_contents_private_key_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*PrivateKey_Secp256K1_)(nil), + } + file_message_contents_private_key_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*PrivateKeyBundle_V1)(nil), + (*PrivateKeyBundle_V2)(nil), + } + file_message_contents_private_key_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*EncryptedPrivateKeyBundle_V1)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_private_key_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_private_key_proto_goTypes, + DependencyIndexes: file_message_contents_private_key_proto_depIdxs, + MessageInfos: file_message_contents_private_key_proto_msgTypes, + }.Build() + File_message_contents_private_key_proto = out.File + file_message_contents_private_key_proto_rawDesc = nil + file_message_contents_private_key_proto_goTypes = nil + file_message_contents_private_key_proto_depIdxs = nil +} diff --git a/pkg/proto/message_contents/private_preferences.pb.go b/pkg/proto/message_contents/private_preferences.pb.go new file mode 100644 index 00000000..354c004d --- /dev/null +++ b/pkg/proto/message_contents/private_preferences.pb.go @@ -0,0 +1,439 @@ +// Private Key Storage +// +// Following definitions are not used in the protocol, instead +// they provide a way for encoding private keys for storage. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/private_preferences.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// PrivatePreferencesAction is a message used to update the client's +// preference store. The only current actions are allow and block. +// Other actions may be added later +type PrivatePreferencesAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to MessageType: + // + // *PrivatePreferencesAction_Allow_ + // *PrivatePreferencesAction_Block_ + MessageType isPrivatePreferencesAction_MessageType `protobuf_oneof:"message_type"` +} + +func (x *PrivatePreferencesAction) Reset() { + *x = PrivatePreferencesAction{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_preferences_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivatePreferencesAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivatePreferencesAction) ProtoMessage() {} + +func (x *PrivatePreferencesAction) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_preferences_proto_msgTypes[0] + 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 PrivatePreferencesAction.ProtoReflect.Descriptor instead. +func (*PrivatePreferencesAction) Descriptor() ([]byte, []int) { + return file_message_contents_private_preferences_proto_rawDescGZIP(), []int{0} +} + +func (m *PrivatePreferencesAction) GetMessageType() isPrivatePreferencesAction_MessageType { + if m != nil { + return m.MessageType + } + return nil +} + +func (x *PrivatePreferencesAction) GetAllow() *PrivatePreferencesAction_Allow { + if x, ok := x.GetMessageType().(*PrivatePreferencesAction_Allow_); ok { + return x.Allow + } + return nil +} + +func (x *PrivatePreferencesAction) GetBlock() *PrivatePreferencesAction_Block { + if x, ok := x.GetMessageType().(*PrivatePreferencesAction_Block_); ok { + return x.Block + } + return nil +} + +type isPrivatePreferencesAction_MessageType interface { + isPrivatePreferencesAction_MessageType() +} + +type PrivatePreferencesAction_Allow_ struct { + Allow *PrivatePreferencesAction_Allow `protobuf:"bytes,1,opt,name=allow,proto3,oneof"` +} + +type PrivatePreferencesAction_Block_ struct { + Block *PrivatePreferencesAction_Block `protobuf:"bytes,2,opt,name=block,proto3,oneof"` +} + +func (*PrivatePreferencesAction_Allow_) isPrivatePreferencesAction_MessageType() {} + +func (*PrivatePreferencesAction_Block_) isPrivatePreferencesAction_MessageType() {} + +// The payload that goes over the wire +type PrivatePreferencesPayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *PrivatePreferencesPayload_V1 + Version isPrivatePreferencesPayload_Version `protobuf_oneof:"version"` +} + +func (x *PrivatePreferencesPayload) Reset() { + *x = PrivatePreferencesPayload{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_preferences_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivatePreferencesPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivatePreferencesPayload) ProtoMessage() {} + +func (x *PrivatePreferencesPayload) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_preferences_proto_msgTypes[1] + 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 PrivatePreferencesPayload.ProtoReflect.Descriptor instead. +func (*PrivatePreferencesPayload) Descriptor() ([]byte, []int) { + return file_message_contents_private_preferences_proto_rawDescGZIP(), []int{1} +} + +func (m *PrivatePreferencesPayload) GetVersion() isPrivatePreferencesPayload_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *PrivatePreferencesPayload) GetV1() *Ciphertext { + if x, ok := x.GetVersion().(*PrivatePreferencesPayload_V1); ok { + return x.V1 + } + return nil +} + +type isPrivatePreferencesPayload_Version interface { + isPrivatePreferencesPayload_Version() +} + +type PrivatePreferencesPayload_V1 struct { + V1 *Ciphertext `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*PrivatePreferencesPayload_V1) isPrivatePreferencesPayload_Version() {} + +// Add the given wallet addresses to the allow list +type PrivatePreferencesAction_Allow struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WalletAddresses []string `protobuf:"bytes,1,rep,name=wallet_addresses,json=walletAddresses,proto3" json:"wallet_addresses,omitempty"` +} + +func (x *PrivatePreferencesAction_Allow) Reset() { + *x = PrivatePreferencesAction_Allow{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_preferences_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivatePreferencesAction_Allow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivatePreferencesAction_Allow) ProtoMessage() {} + +func (x *PrivatePreferencesAction_Allow) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_preferences_proto_msgTypes[2] + 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 PrivatePreferencesAction_Allow.ProtoReflect.Descriptor instead. +func (*PrivatePreferencesAction_Allow) Descriptor() ([]byte, []int) { + return file_message_contents_private_preferences_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *PrivatePreferencesAction_Allow) GetWalletAddresses() []string { + if x != nil { + return x.WalletAddresses + } + return nil +} + +// Add the given wallet addresses to the block list +type PrivatePreferencesAction_Block struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WalletAddresses []string `protobuf:"bytes,1,rep,name=wallet_addresses,json=walletAddresses,proto3" json:"wallet_addresses,omitempty"` +} + +func (x *PrivatePreferencesAction_Block) Reset() { + *x = PrivatePreferencesAction_Block{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_preferences_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivatePreferencesAction_Block) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivatePreferencesAction_Block) ProtoMessage() {} + +func (x *PrivatePreferencesAction_Block) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_preferences_proto_msgTypes[3] + 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 PrivatePreferencesAction_Block.ProtoReflect.Descriptor instead. +func (*PrivatePreferencesAction_Block) Descriptor() ([]byte, []int) { + return file_message_contents_private_preferences_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *PrivatePreferencesAction_Block) GetWalletAddresses() []string { + if x != nil { + return x.WalletAddresses + } + return nil +} + +var File_message_contents_private_preferences_proto protoreflect.FileDescriptor + +var file_message_contents_private_preferences_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x1a, 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x74, 0x65, 0x78, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x02, 0x0a, 0x18, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x05, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x35, 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, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x48, 0x00, 0x52, 0x05, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x12, 0x4d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x35, 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, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x1a, 0x32, 0x0a, 0x05, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x29, 0x0a, 0x10, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x73, 0x1a, 0x32, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x29, + 0x0a, 0x10, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x42, 0x0e, 0x0a, 0x0c, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x5b, 0x0a, 0x19, 0x50, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x33, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, + 0x72, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x42, 0x09, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0xde, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0x42, 0x17, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, + 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, 0xaa, 0x02, + 0x14, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x20, 0x58, + 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x15, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_private_preferences_proto_rawDescOnce sync.Once + file_message_contents_private_preferences_proto_rawDescData = file_message_contents_private_preferences_proto_rawDesc +) + +func file_message_contents_private_preferences_proto_rawDescGZIP() []byte { + file_message_contents_private_preferences_proto_rawDescOnce.Do(func() { + file_message_contents_private_preferences_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_private_preferences_proto_rawDescData) + }) + return file_message_contents_private_preferences_proto_rawDescData +} + +var file_message_contents_private_preferences_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_message_contents_private_preferences_proto_goTypes = []interface{}{ + (*PrivatePreferencesAction)(nil), // 0: xmtp.message_contents.PrivatePreferencesAction + (*PrivatePreferencesPayload)(nil), // 1: xmtp.message_contents.PrivatePreferencesPayload + (*PrivatePreferencesAction_Allow)(nil), // 2: xmtp.message_contents.PrivatePreferencesAction.Allow + (*PrivatePreferencesAction_Block)(nil), // 3: xmtp.message_contents.PrivatePreferencesAction.Block + (*Ciphertext)(nil), // 4: xmtp.message_contents.Ciphertext +} +var file_message_contents_private_preferences_proto_depIdxs = []int32{ + 2, // 0: xmtp.message_contents.PrivatePreferencesAction.allow:type_name -> xmtp.message_contents.PrivatePreferencesAction.Allow + 3, // 1: xmtp.message_contents.PrivatePreferencesAction.block:type_name -> xmtp.message_contents.PrivatePreferencesAction.Block + 4, // 2: xmtp.message_contents.PrivatePreferencesPayload.v1:type_name -> xmtp.message_contents.Ciphertext + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_message_contents_private_preferences_proto_init() } +func file_message_contents_private_preferences_proto_init() { + if File_message_contents_private_preferences_proto != nil { + return + } + file_message_contents_ciphertext_proto_init() + if !protoimpl.UnsafeEnabled { + file_message_contents_private_preferences_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivatePreferencesAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_private_preferences_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivatePreferencesPayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_private_preferences_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivatePreferencesAction_Allow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_private_preferences_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivatePreferencesAction_Block); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_message_contents_private_preferences_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*PrivatePreferencesAction_Allow_)(nil), + (*PrivatePreferencesAction_Block_)(nil), + } + file_message_contents_private_preferences_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*PrivatePreferencesPayload_V1)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_private_preferences_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_private_preferences_proto_goTypes, + DependencyIndexes: file_message_contents_private_preferences_proto_depIdxs, + MessageInfos: file_message_contents_private_preferences_proto_msgTypes, + }.Build() + File_message_contents_private_preferences_proto = out.File + file_message_contents_private_preferences_proto_rawDesc = nil + file_message_contents_private_preferences_proto_goTypes = nil + file_message_contents_private_preferences_proto_depIdxs = nil +} diff --git a/pkg/proto/message_contents/public_key.pb.go b/pkg/proto/message_contents/public_key.pb.go new file mode 100644 index 00000000..64d32b20 --- /dev/null +++ b/pkg/proto/message_contents/public_key.pb.go @@ -0,0 +1,699 @@ +// Structure for representing public keys of different types, +// including signatures used to authenticate the keys. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/public_key.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// UnsignedPublicKey represents a generalized public key, +// defined as a union to support cryptographic algorithm agility. +type UnsignedPublicKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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"` +} + +func (x *UnsignedPublicKey) Reset() { + *x = UnsignedPublicKey{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_public_key_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsignedPublicKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsignedPublicKey) ProtoMessage() {} + +func (x *UnsignedPublicKey) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_public_key_proto_msgTypes[0] + 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 UnsignedPublicKey.ProtoReflect.Descriptor instead. +func (*UnsignedPublicKey) Descriptor() ([]byte, []int) { + return file_message_contents_public_key_proto_rawDescGZIP(), []int{0} +} + +func (x *UnsignedPublicKey) GetCreatedNs() uint64 { + if x != nil { + return x.CreatedNs + } + return 0 +} + +func (m *UnsignedPublicKey) GetUnion() isUnsignedPublicKey_Union { + if m != nil { + return m.Union + } + return nil +} + +func (x *UnsignedPublicKey) GetSecp256K1Uncompressed() *UnsignedPublicKey_Secp256K1Uncompressed { + if x, ok := x.GetUnion().(*UnsignedPublicKey_Secp256K1Uncompressed_); ok { + return x.Secp256K1Uncompressed + } + return nil +} + +type isUnsignedPublicKey_Union interface { + isUnsignedPublicKey_Union() +} + +type UnsignedPublicKey_Secp256K1Uncompressed_ struct { + Secp256K1Uncompressed *UnsignedPublicKey_Secp256K1Uncompressed `protobuf:"bytes,3,opt,name=secp256k1_uncompressed,json=secp256k1Uncompressed,proto3,oneof"` +} + +func (*UnsignedPublicKey_Secp256K1Uncompressed_) isUnsignedPublicKey_Union() {} + +// SignedPublicKey +type SignedPublicKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyBytes []byte `protobuf:"bytes,1,opt,name=key_bytes,json=keyBytes,proto3" json:"key_bytes,omitempty"` // embeds an UnsignedPublicKey + Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // signs key_bytes +} + +func (x *SignedPublicKey) Reset() { + *x = SignedPublicKey{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_public_key_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedPublicKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedPublicKey) ProtoMessage() {} + +func (x *SignedPublicKey) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_public_key_proto_msgTypes[1] + 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 SignedPublicKey.ProtoReflect.Descriptor instead. +func (*SignedPublicKey) Descriptor() ([]byte, []int) { + return file_message_contents_public_key_proto_rawDescGZIP(), []int{1} +} + +func (x *SignedPublicKey) GetKeyBytes() []byte { + if x != nil { + return x.KeyBytes + } + return nil +} + +func (x *SignedPublicKey) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + +// PublicKeyBundle packages the cryptographic keys associated with a wallet. +type SignedPublicKeyBundle struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identity key MUST be signed by the wallet. + IdentityKey *SignedPublicKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` + // Pre-key MUST be signed by the identity key. + PreKey *SignedPublicKey `protobuf:"bytes,2,opt,name=pre_key,json=preKey,proto3" json:"pre_key,omitempty"` +} + +func (x *SignedPublicKeyBundle) Reset() { + *x = SignedPublicKeyBundle{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_public_key_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedPublicKeyBundle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedPublicKeyBundle) ProtoMessage() {} + +func (x *SignedPublicKeyBundle) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_public_key_proto_msgTypes[2] + 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 SignedPublicKeyBundle.ProtoReflect.Descriptor instead. +func (*SignedPublicKeyBundle) Descriptor() ([]byte, []int) { + return file_message_contents_public_key_proto_rawDescGZIP(), []int{2} +} + +func (x *SignedPublicKeyBundle) GetIdentityKey() *SignedPublicKey { + if x != nil { + return x.IdentityKey + } + return nil +} + +func (x *SignedPublicKeyBundle) GetPreKey() *SignedPublicKey { + if x != nil { + return x.PreKey + } + return nil +} + +// PublicKey represents a generalized public key, +// defined as a union to support cryptographic algorithm agility. +type PublicKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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"` +} + +func (x *PublicKey) Reset() { + *x = PublicKey{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_public_key_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicKey) ProtoMessage() {} + +func (x *PublicKey) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_public_key_proto_msgTypes[3] + 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 PublicKey.ProtoReflect.Descriptor instead. +func (*PublicKey) Descriptor() ([]byte, []int) { + return file_message_contents_public_key_proto_rawDescGZIP(), []int{3} +} + +func (x *PublicKey) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *PublicKey) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + +func (m *PublicKey) GetUnion() isPublicKey_Union { + if m != nil { + return m.Union + } + return nil +} + +func (x *PublicKey) GetSecp256K1Uncompressed() *PublicKey_Secp256K1Uncompressed { + if x, ok := x.GetUnion().(*PublicKey_Secp256K1Uncompressed_); ok { + return x.Secp256K1Uncompressed + } + return nil +} + +type isPublicKey_Union interface { + isPublicKey_Union() +} + +type PublicKey_Secp256K1Uncompressed_ struct { + Secp256K1Uncompressed *PublicKey_Secp256K1Uncompressed `protobuf:"bytes,3,opt,name=secp256k1_uncompressed,json=secp256k1Uncompressed,proto3,oneof"` +} + +func (*PublicKey_Secp256K1Uncompressed_) isPublicKey_Union() {} + +// PublicKeyBundle packages the cryptographic keys associated with a wallet, +// both senders and recipients are identified by their key bundles. +type PublicKeyBundle struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identity key MUST be signed by the wallet. + IdentityKey *PublicKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"` + // Pre-key MUST be signed by the identity key. + PreKey *PublicKey `protobuf:"bytes,2,opt,name=pre_key,json=preKey,proto3" json:"pre_key,omitempty"` +} + +func (x *PublicKeyBundle) Reset() { + *x = PublicKeyBundle{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_public_key_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicKeyBundle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicKeyBundle) ProtoMessage() {} + +func (x *PublicKeyBundle) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_public_key_proto_msgTypes[4] + 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 PublicKeyBundle.ProtoReflect.Descriptor instead. +func (*PublicKeyBundle) Descriptor() ([]byte, []int) { + return file_message_contents_public_key_proto_rawDescGZIP(), []int{4} +} + +func (x *PublicKeyBundle) GetIdentityKey() *PublicKey { + if x != nil { + return x.IdentityKey + } + return nil +} + +func (x *PublicKeyBundle) GetPreKey() *PublicKey { + if x != nil { + return x.PreKey + } + return nil +} + +// EC: SECP256k1 +type UnsignedPublicKey_Secp256K1Uncompressed struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // uncompressed point with prefix (0x04) [ P || X || Y ], 65 bytes + Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` +} + +func (x *UnsignedPublicKey_Secp256K1Uncompressed) Reset() { + *x = UnsignedPublicKey_Secp256K1Uncompressed{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_public_key_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsignedPublicKey_Secp256K1Uncompressed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsignedPublicKey_Secp256K1Uncompressed) ProtoMessage() {} + +func (x *UnsignedPublicKey_Secp256K1Uncompressed) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_public_key_proto_msgTypes[5] + 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 UnsignedPublicKey_Secp256K1Uncompressed.ProtoReflect.Descriptor instead. +func (*UnsignedPublicKey_Secp256K1Uncompressed) Descriptor() ([]byte, []int) { + return file_message_contents_public_key_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *UnsignedPublicKey_Secp256K1Uncompressed) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +// The key bytes +type PublicKey_Secp256K1Uncompressed struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // uncompressed point with prefix (0x04) [ P || X || Y ], 65 bytes + Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` +} + +func (x *PublicKey_Secp256K1Uncompressed) Reset() { + *x = PublicKey_Secp256K1Uncompressed{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_public_key_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicKey_Secp256K1Uncompressed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicKey_Secp256K1Uncompressed) ProtoMessage() {} + +func (x *PublicKey_Secp256K1Uncompressed) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_public_key_proto_msgTypes[6] + 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 PublicKey_Secp256K1Uncompressed.ProtoReflect.Descriptor instead. +func (*PublicKey_Secp256K1Uncompressed) Descriptor() ([]byte, []int) { + return file_message_contents_public_key_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *PublicKey_Secp256K1Uncompressed) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +var File_message_contents_public_key_proto protoreflect.FileDescriptor + +var file_message_contents_public_key_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x20, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe3, 0x01, 0x0a, + 0x11, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 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, 0x77, 0x0a, 0x16, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x5f, 0x75, + 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3e, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x2e, 0x53, 0x65, 0x63, 0x70, + 0x32, 0x35, 0x36, 0x6b, 0x31, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x64, 0x48, 0x00, 0x52, 0x15, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x55, 0x6e, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x1a, 0x2d, 0x0a, 0x15, 0x53, 0x65, + 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x75, 0x6e, 0x69, + 0x6f, 0x6e, 0x22, 0x6e, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 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, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x15, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x49, 0x0a, 0x0c, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 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, 0x52, 0x0b, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 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, + 0x52, 0x06, 0x70, 0x72, 0x65, 0x4b, 0x65, 0x79, 0x22, 0xa5, 0x02, 0x0a, 0x09, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x43, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 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, 0x61, 0x74, 0x75, 0x72, 0x65, 0x48, 0x01, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x6f, 0x0a, 0x16, 0x73, 0x65, 0x63, + 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x2e, 0x53, 0x65, 0x63, 0x70, + 0x32, 0x35, 0x36, 0x6b, 0x31, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x64, 0x48, 0x00, 0x52, 0x15, 0x73, 0x65, 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x55, 0x6e, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x1a, 0x2d, 0x0a, 0x15, 0x53, 0x65, + 0x63, 0x70, 0x32, 0x35, 0x36, 0x6b, 0x31, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x75, 0x6e, 0x69, + 0x6f, 0x6e, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x22, 0x91, 0x01, 0x0a, 0x0f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x43, 0x0a, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x0b, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x07, 0x70, 0x72, 0x65, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x70, 0x72, + 0x65, 0x4b, 0x65, 0x79, 0x42, 0xd5, 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x42, 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, + 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, + 0x58, 0x4d, 0x58, 0xaa, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x14, 0x58, 0x6d, 0x74, + 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0xe2, 0x02, 0x20, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_public_key_proto_rawDescOnce sync.Once + file_message_contents_public_key_proto_rawDescData = file_message_contents_public_key_proto_rawDesc +) + +func file_message_contents_public_key_proto_rawDescGZIP() []byte { + file_message_contents_public_key_proto_rawDescOnce.Do(func() { + file_message_contents_public_key_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_public_key_proto_rawDescData) + }) + return file_message_contents_public_key_proto_rawDescData +} + +var file_message_contents_public_key_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_message_contents_public_key_proto_goTypes = []interface{}{ + (*UnsignedPublicKey)(nil), // 0: xmtp.message_contents.UnsignedPublicKey + (*SignedPublicKey)(nil), // 1: xmtp.message_contents.SignedPublicKey + (*SignedPublicKeyBundle)(nil), // 2: xmtp.message_contents.SignedPublicKeyBundle + (*PublicKey)(nil), // 3: xmtp.message_contents.PublicKey + (*PublicKeyBundle)(nil), // 4: xmtp.message_contents.PublicKeyBundle + (*UnsignedPublicKey_Secp256K1Uncompressed)(nil), // 5: xmtp.message_contents.UnsignedPublicKey.Secp256k1Uncompressed + (*PublicKey_Secp256K1Uncompressed)(nil), // 6: xmtp.message_contents.PublicKey.Secp256k1Uncompressed + (*Signature)(nil), // 7: xmtp.message_contents.Signature +} +var file_message_contents_public_key_proto_depIdxs = []int32{ + 5, // 0: xmtp.message_contents.UnsignedPublicKey.secp256k1_uncompressed:type_name -> xmtp.message_contents.UnsignedPublicKey.Secp256k1Uncompressed + 7, // 1: xmtp.message_contents.SignedPublicKey.signature:type_name -> xmtp.message_contents.Signature + 1, // 2: xmtp.message_contents.SignedPublicKeyBundle.identity_key:type_name -> xmtp.message_contents.SignedPublicKey + 1, // 3: xmtp.message_contents.SignedPublicKeyBundle.pre_key:type_name -> xmtp.message_contents.SignedPublicKey + 7, // 4: xmtp.message_contents.PublicKey.signature:type_name -> xmtp.message_contents.Signature + 6, // 5: xmtp.message_contents.PublicKey.secp256k1_uncompressed:type_name -> xmtp.message_contents.PublicKey.Secp256k1Uncompressed + 3, // 6: xmtp.message_contents.PublicKeyBundle.identity_key:type_name -> xmtp.message_contents.PublicKey + 3, // 7: xmtp.message_contents.PublicKeyBundle.pre_key:type_name -> xmtp.message_contents.PublicKey + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_message_contents_public_key_proto_init() } +func file_message_contents_public_key_proto_init() { + if File_message_contents_public_key_proto != nil { + return + } + file_message_contents_signature_proto_init() + if !protoimpl.UnsafeEnabled { + file_message_contents_public_key_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsignedPublicKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_public_key_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedPublicKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_public_key_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedPublicKeyBundle); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_public_key_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublicKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_public_key_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublicKeyBundle); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_public_key_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnsignedPublicKey_Secp256K1Uncompressed); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_public_key_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublicKey_Secp256K1Uncompressed); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_message_contents_public_key_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*UnsignedPublicKey_Secp256K1Uncompressed_)(nil), + } + file_message_contents_public_key_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*PublicKey_Secp256K1Uncompressed_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_public_key_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_public_key_proto_goTypes, + DependencyIndexes: file_message_contents_public_key_proto_depIdxs, + MessageInfos: file_message_contents_public_key_proto_msgTypes, + }.Build() + File_message_contents_public_key_proto = out.File + file_message_contents_public_key_proto_rawDesc = nil + file_message_contents_public_key_proto_goTypes = nil + file_message_contents_public_key_proto_depIdxs = nil +} diff --git a/pkg/proto/message_contents/signature.pb.go b/pkg/proto/message_contents/signature.pb.go new file mode 100644 index 00000000..74f26b6d --- /dev/null +++ b/pkg/proto/message_contents/signature.pb.go @@ -0,0 +1,361 @@ +// Signature is a generic structure for public key signatures. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/signature.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Signature represents a generalized public key signature, +// defined as a union to support cryptographic algorithm agility. +type Signature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Union: + // + // *Signature_EcdsaCompact + // *Signature_WalletEcdsaCompact + Union isSignature_Union `protobuf_oneof:"union"` +} + +func (x *Signature) Reset() { + *x = Signature{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_signature_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Signature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Signature) ProtoMessage() {} + +func (x *Signature) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_signature_proto_msgTypes[0] + 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 Signature.ProtoReflect.Descriptor instead. +func (*Signature) Descriptor() ([]byte, []int) { + return file_message_contents_signature_proto_rawDescGZIP(), []int{0} +} + +func (m *Signature) GetUnion() isSignature_Union { + if m != nil { + return m.Union + } + return nil +} + +func (x *Signature) GetEcdsaCompact() *Signature_ECDSACompact { + if x, ok := x.GetUnion().(*Signature_EcdsaCompact); ok { + return x.EcdsaCompact + } + return nil +} + +func (x *Signature) GetWalletEcdsaCompact() *Signature_WalletECDSACompact { + if x, ok := x.GetUnion().(*Signature_WalletEcdsaCompact); ok { + return x.WalletEcdsaCompact + } + return nil +} + +type isSignature_Union interface { + isSignature_Union() +} + +type Signature_EcdsaCompact struct { + EcdsaCompact *Signature_ECDSACompact `protobuf:"bytes,1,opt,name=ecdsa_compact,json=ecdsaCompact,proto3,oneof"` +} + +type Signature_WalletEcdsaCompact struct { + WalletEcdsaCompact *Signature_WalletECDSACompact `protobuf:"bytes,2,opt,name=wallet_ecdsa_compact,json=walletEcdsaCompact,proto3,oneof"` +} + +func (*Signature_EcdsaCompact) isSignature_Union() {} + +func (*Signature_WalletEcdsaCompact) isSignature_Union() {} + +// ECDSA signature bytes and the recovery bit +type Signature_ECDSACompact struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` // compact representation [ R || S ], 64 bytes + Recovery uint32 `protobuf:"varint,2,opt,name=recovery,proto3" json:"recovery,omitempty"` // recovery bit +} + +func (x *Signature_ECDSACompact) Reset() { + *x = Signature_ECDSACompact{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_signature_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Signature_ECDSACompact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Signature_ECDSACompact) ProtoMessage() {} + +func (x *Signature_ECDSACompact) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_signature_proto_msgTypes[1] + 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 Signature_ECDSACompact.ProtoReflect.Descriptor instead. +func (*Signature_ECDSACompact) Descriptor() ([]byte, []int) { + return file_message_contents_signature_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Signature_ECDSACompact) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +func (x *Signature_ECDSACompact) GetRecovery() uint32 { + if x != nil { + return x.Recovery + } + return 0 +} + +// 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. +type Signature_WalletECDSACompact struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` // compact representation [ R || S ], 64 bytes + Recovery uint32 `protobuf:"varint,2,opt,name=recovery,proto3" json:"recovery,omitempty"` // recovery bit +} + +func (x *Signature_WalletECDSACompact) Reset() { + *x = Signature_WalletECDSACompact{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_signature_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Signature_WalletECDSACompact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Signature_WalletECDSACompact) ProtoMessage() {} + +func (x *Signature_WalletECDSACompact) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_signature_proto_msgTypes[2] + 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 Signature_WalletECDSACompact.ProtoReflect.Descriptor instead. +func (*Signature_WalletECDSACompact) Descriptor() ([]byte, []int) { + return file_message_contents_signature_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Signature_WalletECDSACompact) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +func (x *Signature_WalletECDSACompact) GetRecovery() uint32 { + if x != nil { + return x.Recovery + } + return 0 +} + +var File_message_contents_signature_proto protoreflect.FileDescriptor + +var file_message_contents_signature_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x15, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xdd, 0x02, 0x0a, 0x09, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x54, 0x0a, 0x0d, 0x65, 0x63, 0x64, 0x73, 0x61, + 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 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, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x2e, 0x45, 0x43, 0x44, 0x53, 0x41, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x48, 0x00, 0x52, + 0x0c, 0x65, 0x63, 0x64, 0x73, 0x61, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, 0x67, 0x0a, + 0x14, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x65, 0x63, 0x64, 0x73, 0x61, 0x5f, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 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, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x57, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x45, 0x43, 0x44, 0x53, 0x41, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, + 0x48, 0x00, 0x52, 0x12, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x45, 0x63, 0x64, 0x73, 0x61, 0x43, + 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x1a, 0x40, 0x0a, 0x0c, 0x45, 0x43, 0x44, 0x53, 0x41, 0x43, + 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, + 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x1a, 0x46, 0x0a, 0x12, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x45, 0x43, 0x44, 0x53, 0x41, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x42, 0x07, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x42, 0xd5, 0x01, 0x0a, 0x19, 0x63, 0x6f, + 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x0e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, + 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, 0xaa, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xca, + 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x20, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x58, 0x6d, 0x74, 0x70, + 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_signature_proto_rawDescOnce sync.Once + file_message_contents_signature_proto_rawDescData = file_message_contents_signature_proto_rawDesc +) + +func file_message_contents_signature_proto_rawDescGZIP() []byte { + file_message_contents_signature_proto_rawDescOnce.Do(func() { + file_message_contents_signature_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_signature_proto_rawDescData) + }) + return file_message_contents_signature_proto_rawDescData +} + +var file_message_contents_signature_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_message_contents_signature_proto_goTypes = []interface{}{ + (*Signature)(nil), // 0: xmtp.message_contents.Signature + (*Signature_ECDSACompact)(nil), // 1: xmtp.message_contents.Signature.ECDSACompact + (*Signature_WalletECDSACompact)(nil), // 2: xmtp.message_contents.Signature.WalletECDSACompact +} +var file_message_contents_signature_proto_depIdxs = []int32{ + 1, // 0: xmtp.message_contents.Signature.ecdsa_compact:type_name -> xmtp.message_contents.Signature.ECDSACompact + 2, // 1: xmtp.message_contents.Signature.wallet_ecdsa_compact:type_name -> xmtp.message_contents.Signature.WalletECDSACompact + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_message_contents_signature_proto_init() } +func file_message_contents_signature_proto_init() { + if File_message_contents_signature_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_message_contents_signature_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Signature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_signature_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Signature_ECDSACompact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_signature_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Signature_WalletECDSACompact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_message_contents_signature_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Signature_EcdsaCompact)(nil), + (*Signature_WalletEcdsaCompact)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_signature_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_signature_proto_goTypes, + DependencyIndexes: file_message_contents_signature_proto_depIdxs, + MessageInfos: file_message_contents_signature_proto_msgTypes, + }.Build() + File_message_contents_signature_proto = out.File + file_message_contents_signature_proto_rawDesc = nil + file_message_contents_signature_proto_goTypes = nil + file_message_contents_signature_proto_depIdxs = nil +} diff --git a/pkg/proto/message_contents/signed_payload.pb.go b/pkg/proto/message_contents/signed_payload.pb.go new file mode 100644 index 00000000..d66f8b2b --- /dev/null +++ b/pkg/proto/message_contents/signed_payload.pb.go @@ -0,0 +1,177 @@ +// Signature is a generic structure for signed byte arrays + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: message_contents/signed_payload.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// SignedPayload is a wrapper for a signature and a payload +type SignedPayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *SignedPayload) Reset() { + *x = SignedPayload{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_signed_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignedPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedPayload) ProtoMessage() {} + +func (x *SignedPayload) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_signed_payload_proto_msgTypes[0] + 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 SignedPayload.ProtoReflect.Descriptor instead. +func (*SignedPayload) Descriptor() ([]byte, []int) { + return file_message_contents_signed_payload_proto_rawDescGZIP(), []int{0} +} + +func (x *SignedPayload) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *SignedPayload) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + +var File_message_contents_signed_payload_proto protoreflect.FileDescriptor + +var file_message_contents_signed_payload_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x20, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x69, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3e, 0x0a, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 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, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0xd9, 0x01, 0x0a, 0x19, + 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x12, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, + 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, 0xaa, 0x02, + 0x14, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x20, 0x58, + 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x15, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_message_contents_signed_payload_proto_rawDescOnce sync.Once + file_message_contents_signed_payload_proto_rawDescData = file_message_contents_signed_payload_proto_rawDesc +) + +func file_message_contents_signed_payload_proto_rawDescGZIP() []byte { + file_message_contents_signed_payload_proto_rawDescOnce.Do(func() { + file_message_contents_signed_payload_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_signed_payload_proto_rawDescData) + }) + return file_message_contents_signed_payload_proto_rawDescData +} + +var file_message_contents_signed_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_message_contents_signed_payload_proto_goTypes = []interface{}{ + (*SignedPayload)(nil), // 0: xmtp.message_contents.SignedPayload + (*Signature)(nil), // 1: xmtp.message_contents.Signature +} +var file_message_contents_signed_payload_proto_depIdxs = []int32{ + 1, // 0: xmtp.message_contents.SignedPayload.signature:type_name -> xmtp.message_contents.Signature + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_message_contents_signed_payload_proto_init() } +func file_message_contents_signed_payload_proto_init() { + if File_message_contents_signed_payload_proto != nil { + return + } + file_message_contents_signature_proto_init() + if !protoimpl.UnsafeEnabled { + file_message_contents_signed_payload_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SignedPayload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_message_contents_signed_payload_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_signed_payload_proto_goTypes, + DependencyIndexes: file_message_contents_signed_payload_proto_depIdxs, + MessageInfos: file_message_contents_signed_payload_proto_msgTypes, + }.Build() + File_message_contents_signed_payload_proto = out.File + file_message_contents_signed_payload_proto_rawDesc = nil + file_message_contents_signed_payload_proto_goTypes = nil + file_message_contents_signed_payload_proto_depIdxs = nil +} diff --git a/pkg/proto/mls/api/v1/mls.pb.go b/pkg/proto/mls/api/v1/mls.pb.go new file mode 100644 index 00000000..6b02d3a8 --- /dev/null +++ b/pkg/proto/mls/api/v1/mls.pb.go @@ -0,0 +1,2844 @@ +// Message API + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: mls/api/v1/mls.proto + +package apiv1 + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + message_contents "github.com/xmtp/xmtp-node-go/pkg/proto/message_contents" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Sort direction for queries +type SortDirection int32 + +const ( + SortDirection_SORT_DIRECTION_UNSPECIFIED SortDirection = 0 + SortDirection_SORT_DIRECTION_ASCENDING SortDirection = 1 + SortDirection_SORT_DIRECTION_DESCENDING SortDirection = 2 +) + +// Enum value maps for SortDirection. +var ( + SortDirection_name = map[int32]string{ + 0: "SORT_DIRECTION_UNSPECIFIED", + 1: "SORT_DIRECTION_ASCENDING", + 2: "SORT_DIRECTION_DESCENDING", + } + SortDirection_value = map[string]int32{ + "SORT_DIRECTION_UNSPECIFIED": 0, + "SORT_DIRECTION_ASCENDING": 1, + "SORT_DIRECTION_DESCENDING": 2, + } +) + +func (x SortDirection) Enum() *SortDirection { + p := new(SortDirection) + *p = x + return p +} + +func (x SortDirection) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SortDirection) Descriptor() protoreflect.EnumDescriptor { + return file_mls_api_v1_mls_proto_enumTypes[0].Descriptor() +} + +func (SortDirection) Type() protoreflect.EnumType { + return &file_mls_api_v1_mls_proto_enumTypes[0] +} + +func (x SortDirection) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SortDirection.Descriptor instead. +func (SortDirection) EnumDescriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{0} +} + +// Full representation of a welcome message +type WelcomeMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *WelcomeMessage_V1_ + Version isWelcomeMessage_Version `protobuf_oneof:"version"` +} + +func (x *WelcomeMessage) Reset() { + *x = WelcomeMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WelcomeMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WelcomeMessage) ProtoMessage() {} + +func (x *WelcomeMessage) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[0] + 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 WelcomeMessage.ProtoReflect.Descriptor instead. +func (*WelcomeMessage) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{0} +} + +func (m *WelcomeMessage) GetVersion() isWelcomeMessage_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *WelcomeMessage) GetV1() *WelcomeMessage_V1 { + if x, ok := x.GetVersion().(*WelcomeMessage_V1_); ok { + return x.V1 + } + return nil +} + +type isWelcomeMessage_Version interface { + isWelcomeMessage_Version() +} + +type WelcomeMessage_V1_ struct { + V1 *WelcomeMessage_V1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*WelcomeMessage_V1_) isWelcomeMessage_Version() {} + +// Input type for a welcome message +type WelcomeMessageInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *WelcomeMessageInput_V1_ + Version isWelcomeMessageInput_Version `protobuf_oneof:"version"` +} + +func (x *WelcomeMessageInput) Reset() { + *x = WelcomeMessageInput{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WelcomeMessageInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WelcomeMessageInput) ProtoMessage() {} + +func (x *WelcomeMessageInput) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[1] + 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 WelcomeMessageInput.ProtoReflect.Descriptor instead. +func (*WelcomeMessageInput) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{1} +} + +func (m *WelcomeMessageInput) GetVersion() isWelcomeMessageInput_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *WelcomeMessageInput) GetV1() *WelcomeMessageInput_V1 { + if x, ok := x.GetVersion().(*WelcomeMessageInput_V1_); ok { + return x.V1 + } + return nil +} + +type isWelcomeMessageInput_Version interface { + isWelcomeMessageInput_Version() +} + +type WelcomeMessageInput_V1_ struct { + V1 *WelcomeMessageInput_V1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*WelcomeMessageInput_V1_) isWelcomeMessageInput_Version() {} + +// Full representation of a group message +type GroupMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *GroupMessage_V1_ + Version isGroupMessage_Version `protobuf_oneof:"version"` +} + +func (x *GroupMessage) Reset() { + *x = GroupMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupMessage) ProtoMessage() {} + +func (x *GroupMessage) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[2] + 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 GroupMessage.ProtoReflect.Descriptor instead. +func (*GroupMessage) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{2} +} + +func (m *GroupMessage) GetVersion() isGroupMessage_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *GroupMessage) GetV1() *GroupMessage_V1 { + if x, ok := x.GetVersion().(*GroupMessage_V1_); ok { + return x.V1 + } + return nil +} + +type isGroupMessage_Version interface { + isGroupMessage_Version() +} + +type GroupMessage_V1_ struct { + V1 *GroupMessage_V1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*GroupMessage_V1_) isGroupMessage_Version() {} + +// Input type for a group message +type GroupMessageInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *GroupMessageInput_V1_ + Version isGroupMessageInput_Version `protobuf_oneof:"version"` +} + +func (x *GroupMessageInput) Reset() { + *x = GroupMessageInput{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupMessageInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupMessageInput) ProtoMessage() {} + +func (x *GroupMessageInput) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[3] + 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 GroupMessageInput.ProtoReflect.Descriptor instead. +func (*GroupMessageInput) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{3} +} + +func (m *GroupMessageInput) GetVersion() isGroupMessageInput_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *GroupMessageInput) GetV1() *GroupMessageInput_V1 { + if x, ok := x.GetVersion().(*GroupMessageInput_V1_); ok { + return x.V1 + } + return nil +} + +type isGroupMessageInput_Version interface { + isGroupMessageInput_Version() +} + +type GroupMessageInput_V1_ struct { + V1 *GroupMessageInput_V1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*GroupMessageInput_V1_) isGroupMessageInput_Version() {} + +// Send a batch of MLS messages +type SendGroupMessagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Messages []*GroupMessageInput `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` +} + +func (x *SendGroupMessagesRequest) Reset() { + *x = SendGroupMessagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendGroupMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendGroupMessagesRequest) ProtoMessage() {} + +func (x *SendGroupMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[4] + 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 SendGroupMessagesRequest.ProtoReflect.Descriptor instead. +func (*SendGroupMessagesRequest) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{4} +} + +func (x *SendGroupMessagesRequest) GetMessages() []*GroupMessageInput { + if x != nil { + return x.Messages + } + return nil +} + +// Send a batch of welcome messages +type SendWelcomeMessagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Messages []*WelcomeMessageInput `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` +} + +func (x *SendWelcomeMessagesRequest) Reset() { + *x = SendWelcomeMessagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendWelcomeMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendWelcomeMessagesRequest) ProtoMessage() {} + +func (x *SendWelcomeMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[5] + 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 SendWelcomeMessagesRequest.ProtoReflect.Descriptor instead. +func (*SendWelcomeMessagesRequest) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{5} +} + +func (x *SendWelcomeMessagesRequest) GetMessages() []*WelcomeMessageInput { + if x != nil { + return x.Messages + } + return nil +} + +// A wrapper around the Key Package bytes +type KeyPackageUpload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The owner's wallet address would be extracted from the identity + // credential in the key package, and all signatures would be validated. + KeyPackageTlsSerialized []byte `protobuf:"bytes,1,opt,name=key_package_tls_serialized,json=keyPackageTlsSerialized,proto3" json:"key_package_tls_serialized,omitempty"` +} + +func (x *KeyPackageUpload) Reset() { + *x = KeyPackageUpload{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyPackageUpload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyPackageUpload) ProtoMessage() {} + +func (x *KeyPackageUpload) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[6] + 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 KeyPackageUpload.ProtoReflect.Descriptor instead. +func (*KeyPackageUpload) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{6} +} + +func (x *KeyPackageUpload) GetKeyPackageTlsSerialized() []byte { + if x != nil { + return x.KeyPackageTlsSerialized + } + return nil +} + +// Register a new installation +type RegisterInstallationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Key Package contains all information needed to register an installation + KeyPackage *KeyPackageUpload `protobuf:"bytes,1,opt,name=key_package,json=keyPackage,proto3" json:"key_package,omitempty"` +} + +func (x *RegisterInstallationRequest) Reset() { + *x = RegisterInstallationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterInstallationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterInstallationRequest) ProtoMessage() {} + +func (x *RegisterInstallationRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[7] + 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 RegisterInstallationRequest.ProtoReflect.Descriptor instead. +func (*RegisterInstallationRequest) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{7} +} + +func (x *RegisterInstallationRequest) GetKeyPackage() *KeyPackageUpload { + if x != nil { + return x.KeyPackage + } + return nil +} + +// The response to a RegisterInstallationRequest +type RegisterInstallationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstallationKey []byte `protobuf:"bytes,1,opt,name=installation_key,json=installationKey,proto3" json:"installation_key,omitempty"` +} + +func (x *RegisterInstallationResponse) Reset() { + *x = RegisterInstallationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterInstallationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterInstallationResponse) ProtoMessage() {} + +func (x *RegisterInstallationResponse) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[8] + 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 RegisterInstallationResponse.ProtoReflect.Descriptor instead. +func (*RegisterInstallationResponse) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{8} +} + +func (x *RegisterInstallationResponse) GetInstallationKey() []byte { + if x != nil { + return x.InstallationKey + } + return nil +} + +// Upload a new key packages +type UploadKeyPackageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // An individual key package upload request + KeyPackage *KeyPackageUpload `protobuf:"bytes,1,opt,name=key_package,json=keyPackage,proto3" json:"key_package,omitempty"` +} + +func (x *UploadKeyPackageRequest) Reset() { + *x = UploadKeyPackageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UploadKeyPackageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UploadKeyPackageRequest) ProtoMessage() {} + +func (x *UploadKeyPackageRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[9] + 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 UploadKeyPackageRequest.ProtoReflect.Descriptor instead. +func (*UploadKeyPackageRequest) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{9} +} + +func (x *UploadKeyPackageRequest) GetKeyPackage() *KeyPackageUpload { + if x != nil { + return x.KeyPackage + } + return nil +} + +// Fetch one or more key packages +type FetchKeyPackagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The caller can provide an array of installation keys, and the API + // will return one key package for each installation associated with each + // installation key + InstallationKeys [][]byte `protobuf:"bytes,1,rep,name=installation_keys,json=installationKeys,proto3" json:"installation_keys,omitempty"` +} + +func (x *FetchKeyPackagesRequest) Reset() { + *x = FetchKeyPackagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchKeyPackagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchKeyPackagesRequest) ProtoMessage() {} + +func (x *FetchKeyPackagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[10] + 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 FetchKeyPackagesRequest.ProtoReflect.Descriptor instead. +func (*FetchKeyPackagesRequest) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{10} +} + +func (x *FetchKeyPackagesRequest) GetInstallationKeys() [][]byte { + if x != nil { + return x.InstallationKeys + } + return nil +} + +// The response to a FetchKeyPackagesRequest +type FetchKeyPackagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Returns one key package per installation in the original order of the + // request. If any installations are missing key packages, an empty entry is + // left in their respective spots in the array. + KeyPackages []*FetchKeyPackagesResponse_KeyPackage `protobuf:"bytes,1,rep,name=key_packages,json=keyPackages,proto3" json:"key_packages,omitempty"` +} + +func (x *FetchKeyPackagesResponse) Reset() { + *x = FetchKeyPackagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchKeyPackagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchKeyPackagesResponse) ProtoMessage() {} + +func (x *FetchKeyPackagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[11] + 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 FetchKeyPackagesResponse.ProtoReflect.Descriptor instead. +func (*FetchKeyPackagesResponse) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{11} +} + +func (x *FetchKeyPackagesResponse) GetKeyPackages() []*FetchKeyPackagesResponse_KeyPackage { + if x != nil { + return x.KeyPackages + } + return nil +} + +// Revoke an installation +type RevokeInstallationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstallationKey []byte `protobuf:"bytes,1,opt,name=installation_key,json=installationKey,proto3" json:"installation_key,omitempty"` + // All revocations must be validated with a wallet signature over the + // installation_id being revoked (and some sort of standard prologue) + WalletSignature *message_contents.Signature `protobuf:"bytes,2,opt,name=wallet_signature,json=walletSignature,proto3" json:"wallet_signature,omitempty"` +} + +func (x *RevokeInstallationRequest) Reset() { + *x = RevokeInstallationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RevokeInstallationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeInstallationRequest) ProtoMessage() {} + +func (x *RevokeInstallationRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[12] + 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 RevokeInstallationRequest.ProtoReflect.Descriptor instead. +func (*RevokeInstallationRequest) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{12} +} + +func (x *RevokeInstallationRequest) GetInstallationKey() []byte { + if x != nil { + return x.InstallationKey + } + return nil +} + +func (x *RevokeInstallationRequest) GetWalletSignature() *message_contents.Signature { + if x != nil { + return x.WalletSignature + } + return nil +} + +// Get all updates for an identity since the specified time +type GetIdentityUpdatesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountAddresses []string `protobuf:"bytes,1,rep,name=account_addresses,json=accountAddresses,proto3" json:"account_addresses,omitempty"` + StartTimeNs uint64 `protobuf:"varint,2,opt,name=start_time_ns,json=startTimeNs,proto3" json:"start_time_ns,omitempty"` +} + +func (x *GetIdentityUpdatesRequest) Reset() { + *x = GetIdentityUpdatesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIdentityUpdatesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIdentityUpdatesRequest) ProtoMessage() {} + +func (x *GetIdentityUpdatesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[13] + 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 GetIdentityUpdatesRequest.ProtoReflect.Descriptor instead. +func (*GetIdentityUpdatesRequest) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{13} +} + +func (x *GetIdentityUpdatesRequest) GetAccountAddresses() []string { + if x != nil { + return x.AccountAddresses + } + return nil +} + +func (x *GetIdentityUpdatesRequest) GetStartTimeNs() uint64 { + if x != nil { + return x.StartTimeNs + } + return 0 +} + +// Used to get any new or revoked installations for a list of wallet addresses +type GetIdentityUpdatesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of updates (or empty objects if no changes) in the original order + // of the request + Updates []*GetIdentityUpdatesResponse_WalletUpdates `protobuf:"bytes,1,rep,name=updates,proto3" json:"updates,omitempty"` +} + +func (x *GetIdentityUpdatesResponse) Reset() { + *x = GetIdentityUpdatesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIdentityUpdatesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIdentityUpdatesResponse) ProtoMessage() {} + +func (x *GetIdentityUpdatesResponse) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[14] + 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 GetIdentityUpdatesResponse.ProtoReflect.Descriptor instead. +func (*GetIdentityUpdatesResponse) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{14} +} + +func (x *GetIdentityUpdatesResponse) GetUpdates() []*GetIdentityUpdatesResponse_WalletUpdates { + if x != nil { + return x.Updates + } + return nil +} + +// Pagination config for queries +type PagingInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Direction SortDirection `protobuf:"varint,1,opt,name=direction,proto3,enum=xmtp.mls.api.v1.SortDirection" json:"direction,omitempty"` + Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + IdCursor uint64 `protobuf:"varint,3,opt,name=id_cursor,json=idCursor,proto3" json:"id_cursor,omitempty"` +} + +func (x *PagingInfo) Reset() { + *x = PagingInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PagingInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PagingInfo) ProtoMessage() {} + +func (x *PagingInfo) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_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 PagingInfo.ProtoReflect.Descriptor instead. +func (*PagingInfo) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{15} +} + +func (x *PagingInfo) GetDirection() SortDirection { + if x != nil { + return x.Direction + } + return SortDirection_SORT_DIRECTION_UNSPECIFIED +} + +func (x *PagingInfo) GetLimit() uint32 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *PagingInfo) GetIdCursor() uint64 { + if x != nil { + return x.IdCursor + } + return 0 +} + +// Request for group message queries +type QueryGroupMessagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupId []byte `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + PagingInfo *PagingInfo `protobuf:"bytes,2,opt,name=paging_info,json=pagingInfo,proto3" json:"paging_info,omitempty"` +} + +func (x *QueryGroupMessagesRequest) Reset() { + *x = QueryGroupMessagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGroupMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGroupMessagesRequest) ProtoMessage() {} + +func (x *QueryGroupMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[16] + 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 QueryGroupMessagesRequest.ProtoReflect.Descriptor instead. +func (*QueryGroupMessagesRequest) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{16} +} + +func (x *QueryGroupMessagesRequest) GetGroupId() []byte { + if x != nil { + return x.GroupId + } + return nil +} + +func (x *QueryGroupMessagesRequest) GetPagingInfo() *PagingInfo { + if x != nil { + return x.PagingInfo + } + return nil +} + +// Response for group message queries +type QueryGroupMessagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Messages []*GroupMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` + PagingInfo *PagingInfo `protobuf:"bytes,2,opt,name=paging_info,json=pagingInfo,proto3" json:"paging_info,omitempty"` +} + +func (x *QueryGroupMessagesResponse) Reset() { + *x = QueryGroupMessagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGroupMessagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGroupMessagesResponse) ProtoMessage() {} + +func (x *QueryGroupMessagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[17] + 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 QueryGroupMessagesResponse.ProtoReflect.Descriptor instead. +func (*QueryGroupMessagesResponse) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{17} +} + +func (x *QueryGroupMessagesResponse) GetMessages() []*GroupMessage { + if x != nil { + return x.Messages + } + return nil +} + +func (x *QueryGroupMessagesResponse) GetPagingInfo() *PagingInfo { + if x != nil { + return x.PagingInfo + } + return nil +} + +// Request for welcome message queries +type QueryWelcomeMessagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstallationKey []byte `protobuf:"bytes,1,opt,name=installation_key,json=installationKey,proto3" json:"installation_key,omitempty"` + PagingInfo *PagingInfo `protobuf:"bytes,2,opt,name=paging_info,json=pagingInfo,proto3" json:"paging_info,omitempty"` +} + +func (x *QueryWelcomeMessagesRequest) Reset() { + *x = QueryWelcomeMessagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryWelcomeMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryWelcomeMessagesRequest) ProtoMessage() {} + +func (x *QueryWelcomeMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[18] + 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 QueryWelcomeMessagesRequest.ProtoReflect.Descriptor instead. +func (*QueryWelcomeMessagesRequest) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{18} +} + +func (x *QueryWelcomeMessagesRequest) GetInstallationKey() []byte { + if x != nil { + return x.InstallationKey + } + return nil +} + +func (x *QueryWelcomeMessagesRequest) GetPagingInfo() *PagingInfo { + if x != nil { + return x.PagingInfo + } + return nil +} + +// Response for welcome message queries +type QueryWelcomeMessagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Messages []*WelcomeMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` + PagingInfo *PagingInfo `protobuf:"bytes,2,opt,name=paging_info,json=pagingInfo,proto3" json:"paging_info,omitempty"` +} + +func (x *QueryWelcomeMessagesResponse) Reset() { + *x = QueryWelcomeMessagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryWelcomeMessagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryWelcomeMessagesResponse) ProtoMessage() {} + +func (x *QueryWelcomeMessagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[19] + 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 QueryWelcomeMessagesResponse.ProtoReflect.Descriptor instead. +func (*QueryWelcomeMessagesResponse) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{19} +} + +func (x *QueryWelcomeMessagesResponse) GetMessages() []*WelcomeMessage { + if x != nil { + return x.Messages + } + return nil +} + +func (x *QueryWelcomeMessagesResponse) GetPagingInfo() *PagingInfo { + if x != nil { + return x.PagingInfo + } + return nil +} + +// Request for subscribing to group messages +type SubscribeGroupMessagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filters []*SubscribeGroupMessagesRequest_Filter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` +} + +func (x *SubscribeGroupMessagesRequest) Reset() { + *x = SubscribeGroupMessagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubscribeGroupMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscribeGroupMessagesRequest) ProtoMessage() {} + +func (x *SubscribeGroupMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_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 SubscribeGroupMessagesRequest.ProtoReflect.Descriptor instead. +func (*SubscribeGroupMessagesRequest) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{20} +} + +func (x *SubscribeGroupMessagesRequest) GetFilters() []*SubscribeGroupMessagesRequest_Filter { + if x != nil { + return x.Filters + } + return nil +} + +// Request for subscribing to welcome messages +type SubscribeWelcomeMessagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filters []*SubscribeWelcomeMessagesRequest_Filter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"` +} + +func (x *SubscribeWelcomeMessagesRequest) Reset() { + *x = SubscribeWelcomeMessagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubscribeWelcomeMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscribeWelcomeMessagesRequest) ProtoMessage() {} + +func (x *SubscribeWelcomeMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_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 SubscribeWelcomeMessagesRequest.ProtoReflect.Descriptor instead. +func (*SubscribeWelcomeMessagesRequest) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{21} +} + +func (x *SubscribeWelcomeMessagesRequest) GetFilters() []*SubscribeWelcomeMessagesRequest_Filter { + if x != nil { + return x.Filters + } + return nil +} + +// Version 1 of the WelcomeMessage format +type WelcomeMessage_V1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedNs uint64 `protobuf:"varint,2,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` + InstallationKey []byte `protobuf:"bytes,3,opt,name=installation_key,json=installationKey,proto3" json:"installation_key,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *WelcomeMessage_V1) Reset() { + *x = WelcomeMessage_V1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WelcomeMessage_V1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WelcomeMessage_V1) ProtoMessage() {} + +func (x *WelcomeMessage_V1) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_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 WelcomeMessage_V1.ProtoReflect.Descriptor instead. +func (*WelcomeMessage_V1) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *WelcomeMessage_V1) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *WelcomeMessage_V1) GetCreatedNs() uint64 { + if x != nil { + return x.CreatedNs + } + return 0 +} + +func (x *WelcomeMessage_V1) GetInstallationKey() []byte { + if x != nil { + return x.InstallationKey + } + return nil +} + +func (x *WelcomeMessage_V1) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// Version 1 of the WelcomeMessageInput format +type WelcomeMessageInput_V1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstallationKey []byte `protobuf:"bytes,1,opt,name=installation_key,json=installationKey,proto3" json:"installation_key,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *WelcomeMessageInput_V1) Reset() { + *x = WelcomeMessageInput_V1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WelcomeMessageInput_V1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WelcomeMessageInput_V1) ProtoMessage() {} + +func (x *WelcomeMessageInput_V1) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_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 WelcomeMessageInput_V1.ProtoReflect.Descriptor instead. +func (*WelcomeMessageInput_V1) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *WelcomeMessageInput_V1) GetInstallationKey() []byte { + if x != nil { + return x.InstallationKey + } + return nil +} + +func (x *WelcomeMessageInput_V1) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// Version 1 of the GroupMessage format +type GroupMessage_V1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedNs uint64 `protobuf:"varint,2,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` + GroupId []byte `protobuf:"bytes,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *GroupMessage_V1) Reset() { + *x = GroupMessage_V1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupMessage_V1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupMessage_V1) ProtoMessage() {} + +func (x *GroupMessage_V1) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[24] + 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 GroupMessage_V1.ProtoReflect.Descriptor instead. +func (*GroupMessage_V1) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *GroupMessage_V1) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *GroupMessage_V1) GetCreatedNs() uint64 { + if x != nil { + return x.CreatedNs + } + return 0 +} + +func (x *GroupMessage_V1) GetGroupId() []byte { + if x != nil { + return x.GroupId + } + return nil +} + +func (x *GroupMessage_V1) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// Version 1 of the GroupMessageInput payload format +type GroupMessageInput_V1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *GroupMessageInput_V1) Reset() { + *x = GroupMessageInput_V1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupMessageInput_V1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupMessageInput_V1) ProtoMessage() {} + +func (x *GroupMessageInput_V1) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[25] + 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 GroupMessageInput_V1.ProtoReflect.Descriptor instead. +func (*GroupMessageInput_V1) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *GroupMessageInput_V1) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// An individual key package +type FetchKeyPackagesResponse_KeyPackage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyPackageTlsSerialized []byte `protobuf:"bytes,1,opt,name=key_package_tls_serialized,json=keyPackageTlsSerialized,proto3" json:"key_package_tls_serialized,omitempty"` +} + +func (x *FetchKeyPackagesResponse_KeyPackage) Reset() { + *x = FetchKeyPackagesResponse_KeyPackage{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchKeyPackagesResponse_KeyPackage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchKeyPackagesResponse_KeyPackage) ProtoMessage() {} + +func (x *FetchKeyPackagesResponse_KeyPackage) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[26] + 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 FetchKeyPackagesResponse_KeyPackage.ProtoReflect.Descriptor instead. +func (*FetchKeyPackagesResponse_KeyPackage) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{11, 0} +} + +func (x *FetchKeyPackagesResponse_KeyPackage) GetKeyPackageTlsSerialized() []byte { + if x != nil { + return x.KeyPackageTlsSerialized + } + return nil +} + +// A new installation key was seen for the first time by the nodes +type GetIdentityUpdatesResponse_NewInstallationUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstallationKey []byte `protobuf:"bytes,1,opt,name=installation_key,json=installationKey,proto3" json:"installation_key,omitempty"` + CredentialIdentity []byte `protobuf:"bytes,2,opt,name=credential_identity,json=credentialIdentity,proto3" json:"credential_identity,omitempty"` +} + +func (x *GetIdentityUpdatesResponse_NewInstallationUpdate) Reset() { + *x = GetIdentityUpdatesResponse_NewInstallationUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIdentityUpdatesResponse_NewInstallationUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIdentityUpdatesResponse_NewInstallationUpdate) ProtoMessage() {} + +func (x *GetIdentityUpdatesResponse_NewInstallationUpdate) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[27] + 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 GetIdentityUpdatesResponse_NewInstallationUpdate.ProtoReflect.Descriptor instead. +func (*GetIdentityUpdatesResponse_NewInstallationUpdate) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{14, 0} +} + +func (x *GetIdentityUpdatesResponse_NewInstallationUpdate) GetInstallationKey() []byte { + if x != nil { + return x.InstallationKey + } + return nil +} + +func (x *GetIdentityUpdatesResponse_NewInstallationUpdate) GetCredentialIdentity() []byte { + if x != nil { + return x.CredentialIdentity + } + return nil +} + +// An installation was revoked +type GetIdentityUpdatesResponse_RevokedInstallationUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstallationKey []byte `protobuf:"bytes,1,opt,name=installation_key,json=installationKey,proto3" json:"installation_key,omitempty"` +} + +func (x *GetIdentityUpdatesResponse_RevokedInstallationUpdate) Reset() { + *x = GetIdentityUpdatesResponse_RevokedInstallationUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIdentityUpdatesResponse_RevokedInstallationUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIdentityUpdatesResponse_RevokedInstallationUpdate) ProtoMessage() {} + +func (x *GetIdentityUpdatesResponse_RevokedInstallationUpdate) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[28] + 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 GetIdentityUpdatesResponse_RevokedInstallationUpdate.ProtoReflect.Descriptor instead. +func (*GetIdentityUpdatesResponse_RevokedInstallationUpdate) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{14, 1} +} + +func (x *GetIdentityUpdatesResponse_RevokedInstallationUpdate) GetInstallationKey() []byte { + if x != nil { + return x.InstallationKey + } + return nil +} + +// A wrapper for any update to the wallet +type GetIdentityUpdatesResponse_Update struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TimestampNs uint64 `protobuf:"varint,1,opt,name=timestamp_ns,json=timestampNs,proto3" json:"timestamp_ns,omitempty"` + // Types that are assignable to Kind: + // + // *GetIdentityUpdatesResponse_Update_NewInstallation + // *GetIdentityUpdatesResponse_Update_RevokedInstallation + Kind isGetIdentityUpdatesResponse_Update_Kind `protobuf_oneof:"kind"` +} + +func (x *GetIdentityUpdatesResponse_Update) Reset() { + *x = GetIdentityUpdatesResponse_Update{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIdentityUpdatesResponse_Update) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIdentityUpdatesResponse_Update) ProtoMessage() {} + +func (x *GetIdentityUpdatesResponse_Update) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[29] + 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 GetIdentityUpdatesResponse_Update.ProtoReflect.Descriptor instead. +func (*GetIdentityUpdatesResponse_Update) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{14, 2} +} + +func (x *GetIdentityUpdatesResponse_Update) GetTimestampNs() uint64 { + if x != nil { + return x.TimestampNs + } + return 0 +} + +func (m *GetIdentityUpdatesResponse_Update) GetKind() isGetIdentityUpdatesResponse_Update_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (x *GetIdentityUpdatesResponse_Update) GetNewInstallation() *GetIdentityUpdatesResponse_NewInstallationUpdate { + if x, ok := x.GetKind().(*GetIdentityUpdatesResponse_Update_NewInstallation); ok { + return x.NewInstallation + } + return nil +} + +func (x *GetIdentityUpdatesResponse_Update) GetRevokedInstallation() *GetIdentityUpdatesResponse_RevokedInstallationUpdate { + if x, ok := x.GetKind().(*GetIdentityUpdatesResponse_Update_RevokedInstallation); ok { + return x.RevokedInstallation + } + return nil +} + +type isGetIdentityUpdatesResponse_Update_Kind interface { + isGetIdentityUpdatesResponse_Update_Kind() +} + +type GetIdentityUpdatesResponse_Update_NewInstallation struct { + NewInstallation *GetIdentityUpdatesResponse_NewInstallationUpdate `protobuf:"bytes,2,opt,name=new_installation,json=newInstallation,proto3,oneof"` +} + +type GetIdentityUpdatesResponse_Update_RevokedInstallation struct { + RevokedInstallation *GetIdentityUpdatesResponse_RevokedInstallationUpdate `protobuf:"bytes,3,opt,name=revoked_installation,json=revokedInstallation,proto3,oneof"` +} + +func (*GetIdentityUpdatesResponse_Update_NewInstallation) isGetIdentityUpdatesResponse_Update_Kind() { +} + +func (*GetIdentityUpdatesResponse_Update_RevokedInstallation) isGetIdentityUpdatesResponse_Update_Kind() { +} + +// A wrapper for the updates for a single wallet +type GetIdentityUpdatesResponse_WalletUpdates struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Updates []*GetIdentityUpdatesResponse_Update `protobuf:"bytes,1,rep,name=updates,proto3" json:"updates,omitempty"` +} + +func (x *GetIdentityUpdatesResponse_WalletUpdates) Reset() { + *x = GetIdentityUpdatesResponse_WalletUpdates{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIdentityUpdatesResponse_WalletUpdates) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIdentityUpdatesResponse_WalletUpdates) ProtoMessage() {} + +func (x *GetIdentityUpdatesResponse_WalletUpdates) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[30] + 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 GetIdentityUpdatesResponse_WalletUpdates.ProtoReflect.Descriptor instead. +func (*GetIdentityUpdatesResponse_WalletUpdates) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{14, 3} +} + +func (x *GetIdentityUpdatesResponse_WalletUpdates) GetUpdates() []*GetIdentityUpdatesResponse_Update { + if x != nil { + return x.Updates + } + return nil +} + +// Subscription filter +type SubscribeGroupMessagesRequest_Filter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupId []byte `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + IdCursor uint64 `protobuf:"varint,2,opt,name=id_cursor,json=idCursor,proto3" json:"id_cursor,omitempty"` +} + +func (x *SubscribeGroupMessagesRequest_Filter) Reset() { + *x = SubscribeGroupMessagesRequest_Filter{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubscribeGroupMessagesRequest_Filter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscribeGroupMessagesRequest_Filter) ProtoMessage() {} + +func (x *SubscribeGroupMessagesRequest_Filter) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[31] + 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 SubscribeGroupMessagesRequest_Filter.ProtoReflect.Descriptor instead. +func (*SubscribeGroupMessagesRequest_Filter) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{20, 0} +} + +func (x *SubscribeGroupMessagesRequest_Filter) GetGroupId() []byte { + if x != nil { + return x.GroupId + } + return nil +} + +func (x *SubscribeGroupMessagesRequest_Filter) GetIdCursor() uint64 { + if x != nil { + return x.IdCursor + } + return 0 +} + +// Subscription filter +type SubscribeWelcomeMessagesRequest_Filter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstallationKey []byte `protobuf:"bytes,1,opt,name=installation_key,json=installationKey,proto3" json:"installation_key,omitempty"` + IdCursor uint64 `protobuf:"varint,2,opt,name=id_cursor,json=idCursor,proto3" json:"id_cursor,omitempty"` +} + +func (x *SubscribeWelcomeMessagesRequest_Filter) Reset() { + *x = SubscribeWelcomeMessagesRequest_Filter{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_api_v1_mls_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubscribeWelcomeMessagesRequest_Filter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscribeWelcomeMessagesRequest_Filter) ProtoMessage() {} + +func (x *SubscribeWelcomeMessagesRequest_Filter) ProtoReflect() protoreflect.Message { + mi := &file_mls_api_v1_mls_proto_msgTypes[32] + 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 SubscribeWelcomeMessagesRequest_Filter.ProtoReflect.Descriptor instead. +func (*SubscribeWelcomeMessagesRequest_Filter) Descriptor() ([]byte, []int) { + return file_mls_api_v1_mls_proto_rawDescGZIP(), []int{21, 0} +} + +func (x *SubscribeWelcomeMessagesRequest_Filter) GetInstallationKey() []byte { + if x != nil { + return x.InstallationKey + } + return nil +} + +func (x *SubscribeWelcomeMessagesRequest_Filter) GetIdCursor() uint64 { + if x != nil { + return x.IdCursor + } + return 0 +} + +var File_mls_api_v1_mls_proto protoreflect.FileDescriptor + +var file_mls_api_v1_mls_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x6d, 0x6c, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6c, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, + 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, 0x0e, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x1a, 0x72, 0x0a, + 0x02, 0x56, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x4e, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa0, 0x01, 0x0a, + 0x13, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x12, 0x39, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x1a, + 0x43, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, + 0xb1, 0x01, 0x0a, 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x32, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x56, 0x31, 0x48, 0x00, + 0x52, 0x02, 0x76, 0x31, 0x1a, 0x62, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 0x71, 0x0a, 0x11, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x37, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, + 0x31, 0x1a, 0x18, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x09, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5a, 0x0a, 0x18, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x22, 0x5e, 0x0a, 0x1a, 0x53, 0x65, 0x6e, 0x64, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, + 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x10, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x17, 0x6b, 0x65, 0x79, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x54, 0x6c, 0x73, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x22, 0x61, 0x0a, 0x1b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0b, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, + 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0a, 0x6b, 0x65, 0x79, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x22, 0x49, 0x0a, 0x1c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, + 0x79, 0x22, 0x5d, 0x0a, 0x17, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0b, + 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x55, 0x70, + 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0a, 0x6b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x22, 0x46, 0x0a, 0x17, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0c, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, + 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x52, 0x0b, 0x6b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x49, + 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x1a, + 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6c, 0x73, 0x5f, + 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x17, 0x6b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x54, 0x6c, 0x73, 0x53, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x93, 0x01, 0x0a, 0x19, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, + 0x65, 0x79, 0x12, 0x4b, 0x0a, 0x10, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 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, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0f, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, + 0x6c, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4e, 0x73, 0x22, 0xaf, 0x05, + 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x07, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, + 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x73, 0x1a, 0x73, 0x0a, 0x15, 0x4e, 0x65, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x1a, 0x46, 0x0a, 0x19, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x64, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x1a, 0x9f, + 0x02, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4e, 0x73, 0x12, 0x6e, 0x0a, 0x10, + 0x6e, 0x65, 0x77, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x4e, 0x65, 0x77, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x6e, 0x65, 0x77, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7a, 0x0a, 0x14, + 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x48, 0x00, 0x52, 0x13, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x1a, 0x5d, 0x0a, 0x0d, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x73, 0x12, 0x4c, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x22, + 0x7d, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3c, 0x0a, + 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1e, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x74, + 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, + 0x67, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, + 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x95, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x3c, + 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x86, 0x01, 0x0a, + 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x67, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x99, 0x01, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, + 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x6c, 0x63, 0x6f, + 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, + 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0xb2, 0x01, 0x0a, 0x1d, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x1a, 0x40, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x19, + 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x64, 0x5f, + 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x64, + 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0xc6, 0x01, 0x0a, 0x1f, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x51, 0x0a, 0x07, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x50, 0x0a, + 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, + 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x64, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x64, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x2a, + 0x6c, 0x0a, 0x0d, 0x53, 0x6f, 0x72, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x1d, + 0x0a, 0x19, 0x53, 0x4f, 0x52, 0x54, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x44, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x32, 0xcd, 0x0c, + 0x0a, 0x06, 0x4d, 0x6c, 0x73, 0x41, 0x70, 0x69, 0x12, 0x7e, 0x0a, 0x11, 0x53, 0x65, 0x6e, 0x64, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x29, 0x2e, + 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x6e, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x6d, 0x6c, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x6e, 0x64, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2d, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x6e, + 0x64, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x12, 0x2b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, + 0x22, 0x1d, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x6e, 0x64, 0x2d, 0x77, + 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, + 0x9d, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, + 0x22, 0x1d, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x2d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x7b, 0x0a, 0x10, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x12, 0x28, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4b, 0x65, 0x79, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, + 0x22, 0x1a, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x2d, 0x6b, 0x65, 0x79, 0x2d, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x8e, 0x01, 0x0a, + 0x10, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x73, 0x12, 0x28, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, + 0x74, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, + 0x2a, 0x22, 0x1a, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x65, 0x74, 0x63, 0x68, + 0x2d, 0x6b, 0x65, 0x79, 0x2d, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x80, 0x01, + 0x0a, 0x12, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, + 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x2d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x96, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, + 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x6d, 0x6c, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x2d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x12, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x12, 0x2a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x12, 0x9e, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x65, 0x6c, 0x63, + 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, + 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2d, 0x77, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x2e, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2d, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x30, 0x01, 0x12, 0x9e, 0x01, 0x0a, + 0x18, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, + 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, + 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2d, 0x77, 0x65, 0x6c, 0x63, 0x6f, + 0x6d, 0x65, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x30, 0x01, 0x42, 0xc9, 0x01, + 0x92, 0x41, 0x0f, 0x12, 0x0d, 0x0a, 0x06, 0x4d, 0x6c, 0x73, 0x41, 0x70, 0x69, 0x32, 0x03, 0x31, + 0x2e, 0x30, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x4d, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, + 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x58, + 0x4d, 0x41, 0xaa, 0x02, 0x0f, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x6c, 0x73, 0x2e, 0x41, 0x70, + 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0f, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x6c, 0x73, 0x5c, + 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1b, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x6c, + 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x6c, 0x73, + 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_mls_api_v1_mls_proto_rawDescOnce sync.Once + file_mls_api_v1_mls_proto_rawDescData = file_mls_api_v1_mls_proto_rawDesc +) + +func file_mls_api_v1_mls_proto_rawDescGZIP() []byte { + file_mls_api_v1_mls_proto_rawDescOnce.Do(func() { + file_mls_api_v1_mls_proto_rawDescData = protoimpl.X.CompressGZIP(file_mls_api_v1_mls_proto_rawDescData) + }) + return file_mls_api_v1_mls_proto_rawDescData +} + +var file_mls_api_v1_mls_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_mls_api_v1_mls_proto_msgTypes = make([]protoimpl.MessageInfo, 33) +var file_mls_api_v1_mls_proto_goTypes = []interface{}{ + (SortDirection)(0), // 0: xmtp.mls.api.v1.SortDirection + (*WelcomeMessage)(nil), // 1: xmtp.mls.api.v1.WelcomeMessage + (*WelcomeMessageInput)(nil), // 2: xmtp.mls.api.v1.WelcomeMessageInput + (*GroupMessage)(nil), // 3: xmtp.mls.api.v1.GroupMessage + (*GroupMessageInput)(nil), // 4: xmtp.mls.api.v1.GroupMessageInput + (*SendGroupMessagesRequest)(nil), // 5: xmtp.mls.api.v1.SendGroupMessagesRequest + (*SendWelcomeMessagesRequest)(nil), // 6: xmtp.mls.api.v1.SendWelcomeMessagesRequest + (*KeyPackageUpload)(nil), // 7: xmtp.mls.api.v1.KeyPackageUpload + (*RegisterInstallationRequest)(nil), // 8: xmtp.mls.api.v1.RegisterInstallationRequest + (*RegisterInstallationResponse)(nil), // 9: xmtp.mls.api.v1.RegisterInstallationResponse + (*UploadKeyPackageRequest)(nil), // 10: xmtp.mls.api.v1.UploadKeyPackageRequest + (*FetchKeyPackagesRequest)(nil), // 11: xmtp.mls.api.v1.FetchKeyPackagesRequest + (*FetchKeyPackagesResponse)(nil), // 12: xmtp.mls.api.v1.FetchKeyPackagesResponse + (*RevokeInstallationRequest)(nil), // 13: xmtp.mls.api.v1.RevokeInstallationRequest + (*GetIdentityUpdatesRequest)(nil), // 14: xmtp.mls.api.v1.GetIdentityUpdatesRequest + (*GetIdentityUpdatesResponse)(nil), // 15: xmtp.mls.api.v1.GetIdentityUpdatesResponse + (*PagingInfo)(nil), // 16: xmtp.mls.api.v1.PagingInfo + (*QueryGroupMessagesRequest)(nil), // 17: xmtp.mls.api.v1.QueryGroupMessagesRequest + (*QueryGroupMessagesResponse)(nil), // 18: xmtp.mls.api.v1.QueryGroupMessagesResponse + (*QueryWelcomeMessagesRequest)(nil), // 19: xmtp.mls.api.v1.QueryWelcomeMessagesRequest + (*QueryWelcomeMessagesResponse)(nil), // 20: xmtp.mls.api.v1.QueryWelcomeMessagesResponse + (*SubscribeGroupMessagesRequest)(nil), // 21: xmtp.mls.api.v1.SubscribeGroupMessagesRequest + (*SubscribeWelcomeMessagesRequest)(nil), // 22: xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest + (*WelcomeMessage_V1)(nil), // 23: xmtp.mls.api.v1.WelcomeMessage.V1 + (*WelcomeMessageInput_V1)(nil), // 24: xmtp.mls.api.v1.WelcomeMessageInput.V1 + (*GroupMessage_V1)(nil), // 25: xmtp.mls.api.v1.GroupMessage.V1 + (*GroupMessageInput_V1)(nil), // 26: xmtp.mls.api.v1.GroupMessageInput.V1 + (*FetchKeyPackagesResponse_KeyPackage)(nil), // 27: xmtp.mls.api.v1.FetchKeyPackagesResponse.KeyPackage + (*GetIdentityUpdatesResponse_NewInstallationUpdate)(nil), // 28: xmtp.mls.api.v1.GetIdentityUpdatesResponse.NewInstallationUpdate + (*GetIdentityUpdatesResponse_RevokedInstallationUpdate)(nil), // 29: xmtp.mls.api.v1.GetIdentityUpdatesResponse.RevokedInstallationUpdate + (*GetIdentityUpdatesResponse_Update)(nil), // 30: xmtp.mls.api.v1.GetIdentityUpdatesResponse.Update + (*GetIdentityUpdatesResponse_WalletUpdates)(nil), // 31: xmtp.mls.api.v1.GetIdentityUpdatesResponse.WalletUpdates + (*SubscribeGroupMessagesRequest_Filter)(nil), // 32: xmtp.mls.api.v1.SubscribeGroupMessagesRequest.Filter + (*SubscribeWelcomeMessagesRequest_Filter)(nil), // 33: xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest.Filter + (*message_contents.Signature)(nil), // 34: xmtp.message_contents.Signature + (*emptypb.Empty)(nil), // 35: google.protobuf.Empty +} +var file_mls_api_v1_mls_proto_depIdxs = []int32{ + 23, // 0: xmtp.mls.api.v1.WelcomeMessage.v1:type_name -> xmtp.mls.api.v1.WelcomeMessage.V1 + 24, // 1: xmtp.mls.api.v1.WelcomeMessageInput.v1:type_name -> xmtp.mls.api.v1.WelcomeMessageInput.V1 + 25, // 2: xmtp.mls.api.v1.GroupMessage.v1:type_name -> xmtp.mls.api.v1.GroupMessage.V1 + 26, // 3: xmtp.mls.api.v1.GroupMessageInput.v1:type_name -> xmtp.mls.api.v1.GroupMessageInput.V1 + 4, // 4: xmtp.mls.api.v1.SendGroupMessagesRequest.messages:type_name -> xmtp.mls.api.v1.GroupMessageInput + 2, // 5: xmtp.mls.api.v1.SendWelcomeMessagesRequest.messages:type_name -> xmtp.mls.api.v1.WelcomeMessageInput + 7, // 6: xmtp.mls.api.v1.RegisterInstallationRequest.key_package:type_name -> xmtp.mls.api.v1.KeyPackageUpload + 7, // 7: xmtp.mls.api.v1.UploadKeyPackageRequest.key_package:type_name -> xmtp.mls.api.v1.KeyPackageUpload + 27, // 8: xmtp.mls.api.v1.FetchKeyPackagesResponse.key_packages:type_name -> xmtp.mls.api.v1.FetchKeyPackagesResponse.KeyPackage + 34, // 9: xmtp.mls.api.v1.RevokeInstallationRequest.wallet_signature:type_name -> xmtp.message_contents.Signature + 31, // 10: xmtp.mls.api.v1.GetIdentityUpdatesResponse.updates:type_name -> xmtp.mls.api.v1.GetIdentityUpdatesResponse.WalletUpdates + 0, // 11: xmtp.mls.api.v1.PagingInfo.direction:type_name -> xmtp.mls.api.v1.SortDirection + 16, // 12: xmtp.mls.api.v1.QueryGroupMessagesRequest.paging_info:type_name -> xmtp.mls.api.v1.PagingInfo + 3, // 13: xmtp.mls.api.v1.QueryGroupMessagesResponse.messages:type_name -> xmtp.mls.api.v1.GroupMessage + 16, // 14: xmtp.mls.api.v1.QueryGroupMessagesResponse.paging_info:type_name -> xmtp.mls.api.v1.PagingInfo + 16, // 15: xmtp.mls.api.v1.QueryWelcomeMessagesRequest.paging_info:type_name -> xmtp.mls.api.v1.PagingInfo + 1, // 16: xmtp.mls.api.v1.QueryWelcomeMessagesResponse.messages:type_name -> xmtp.mls.api.v1.WelcomeMessage + 16, // 17: xmtp.mls.api.v1.QueryWelcomeMessagesResponse.paging_info:type_name -> xmtp.mls.api.v1.PagingInfo + 32, // 18: xmtp.mls.api.v1.SubscribeGroupMessagesRequest.filters:type_name -> xmtp.mls.api.v1.SubscribeGroupMessagesRequest.Filter + 33, // 19: xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest.filters:type_name -> xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest.Filter + 28, // 20: xmtp.mls.api.v1.GetIdentityUpdatesResponse.Update.new_installation:type_name -> xmtp.mls.api.v1.GetIdentityUpdatesResponse.NewInstallationUpdate + 29, // 21: xmtp.mls.api.v1.GetIdentityUpdatesResponse.Update.revoked_installation:type_name -> xmtp.mls.api.v1.GetIdentityUpdatesResponse.RevokedInstallationUpdate + 30, // 22: xmtp.mls.api.v1.GetIdentityUpdatesResponse.WalletUpdates.updates:type_name -> xmtp.mls.api.v1.GetIdentityUpdatesResponse.Update + 5, // 23: xmtp.mls.api.v1.MlsApi.SendGroupMessages:input_type -> xmtp.mls.api.v1.SendGroupMessagesRequest + 6, // 24: xmtp.mls.api.v1.MlsApi.SendWelcomeMessages:input_type -> xmtp.mls.api.v1.SendWelcomeMessagesRequest + 8, // 25: xmtp.mls.api.v1.MlsApi.RegisterInstallation:input_type -> xmtp.mls.api.v1.RegisterInstallationRequest + 10, // 26: xmtp.mls.api.v1.MlsApi.UploadKeyPackage:input_type -> xmtp.mls.api.v1.UploadKeyPackageRequest + 11, // 27: xmtp.mls.api.v1.MlsApi.FetchKeyPackages:input_type -> xmtp.mls.api.v1.FetchKeyPackagesRequest + 13, // 28: xmtp.mls.api.v1.MlsApi.RevokeInstallation:input_type -> xmtp.mls.api.v1.RevokeInstallationRequest + 14, // 29: xmtp.mls.api.v1.MlsApi.GetIdentityUpdates:input_type -> xmtp.mls.api.v1.GetIdentityUpdatesRequest + 17, // 30: xmtp.mls.api.v1.MlsApi.QueryGroupMessages:input_type -> xmtp.mls.api.v1.QueryGroupMessagesRequest + 19, // 31: xmtp.mls.api.v1.MlsApi.QueryWelcomeMessages:input_type -> xmtp.mls.api.v1.QueryWelcomeMessagesRequest + 21, // 32: xmtp.mls.api.v1.MlsApi.SubscribeGroupMessages:input_type -> xmtp.mls.api.v1.SubscribeGroupMessagesRequest + 22, // 33: xmtp.mls.api.v1.MlsApi.SubscribeWelcomeMessages:input_type -> xmtp.mls.api.v1.SubscribeWelcomeMessagesRequest + 35, // 34: xmtp.mls.api.v1.MlsApi.SendGroupMessages:output_type -> google.protobuf.Empty + 35, // 35: xmtp.mls.api.v1.MlsApi.SendWelcomeMessages:output_type -> google.protobuf.Empty + 9, // 36: xmtp.mls.api.v1.MlsApi.RegisterInstallation:output_type -> xmtp.mls.api.v1.RegisterInstallationResponse + 35, // 37: xmtp.mls.api.v1.MlsApi.UploadKeyPackage:output_type -> google.protobuf.Empty + 12, // 38: xmtp.mls.api.v1.MlsApi.FetchKeyPackages:output_type -> xmtp.mls.api.v1.FetchKeyPackagesResponse + 35, // 39: xmtp.mls.api.v1.MlsApi.RevokeInstallation:output_type -> google.protobuf.Empty + 15, // 40: xmtp.mls.api.v1.MlsApi.GetIdentityUpdates:output_type -> xmtp.mls.api.v1.GetIdentityUpdatesResponse + 18, // 41: xmtp.mls.api.v1.MlsApi.QueryGroupMessages:output_type -> xmtp.mls.api.v1.QueryGroupMessagesResponse + 20, // 42: xmtp.mls.api.v1.MlsApi.QueryWelcomeMessages:output_type -> xmtp.mls.api.v1.QueryWelcomeMessagesResponse + 3, // 43: xmtp.mls.api.v1.MlsApi.SubscribeGroupMessages:output_type -> xmtp.mls.api.v1.GroupMessage + 1, // 44: xmtp.mls.api.v1.MlsApi.SubscribeWelcomeMessages:output_type -> xmtp.mls.api.v1.WelcomeMessage + 34, // [34:45] is the sub-list for method output_type + 23, // [23:34] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name +} + +func init() { file_mls_api_v1_mls_proto_init() } +func file_mls_api_v1_mls_proto_init() { + if File_mls_api_v1_mls_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mls_api_v1_mls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WelcomeMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WelcomeMessageInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupMessageInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendGroupMessagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendWelcomeMessagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyPackageUpload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterInstallationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterInstallationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UploadKeyPackageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchKeyPackagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchKeyPackagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RevokeInstallationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIdentityUpdatesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIdentityUpdatesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PagingInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGroupMessagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGroupMessagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryWelcomeMessagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryWelcomeMessagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscribeGroupMessagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscribeWelcomeMessagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WelcomeMessage_V1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WelcomeMessageInput_V1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupMessage_V1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupMessageInput_V1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchKeyPackagesResponse_KeyPackage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIdentityUpdatesResponse_NewInstallationUpdate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIdentityUpdatesResponse_RevokedInstallationUpdate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIdentityUpdatesResponse_Update); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIdentityUpdatesResponse_WalletUpdates); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscribeGroupMessagesRequest_Filter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_api_v1_mls_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscribeWelcomeMessagesRequest_Filter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_mls_api_v1_mls_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*WelcomeMessage_V1_)(nil), + } + file_mls_api_v1_mls_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*WelcomeMessageInput_V1_)(nil), + } + file_mls_api_v1_mls_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*GroupMessage_V1_)(nil), + } + file_mls_api_v1_mls_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*GroupMessageInput_V1_)(nil), + } + file_mls_api_v1_mls_proto_msgTypes[29].OneofWrappers = []interface{}{ + (*GetIdentityUpdatesResponse_Update_NewInstallation)(nil), + (*GetIdentityUpdatesResponse_Update_RevokedInstallation)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mls_api_v1_mls_proto_rawDesc, + NumEnums: 1, + NumMessages: 33, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_mls_api_v1_mls_proto_goTypes, + DependencyIndexes: file_mls_api_v1_mls_proto_depIdxs, + EnumInfos: file_mls_api_v1_mls_proto_enumTypes, + MessageInfos: file_mls_api_v1_mls_proto_msgTypes, + }.Build() + File_mls_api_v1_mls_proto = out.File + file_mls_api_v1_mls_proto_rawDesc = nil + file_mls_api_v1_mls_proto_goTypes = nil + file_mls_api_v1_mls_proto_depIdxs = nil +} diff --git a/pkg/proto/mls/api/v1/mls.pb.gw.go b/pkg/proto/mls/api/v1/mls.pb.gw.go new file mode 100644 index 00000000..81e69096 --- /dev/null +++ b/pkg/proto/mls/api/v1/mls.pb.gw.go @@ -0,0 +1,887 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: mls/api/v1/mls.proto + +/* +Package apiv1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package apiv1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_MlsApi_SendGroupMessages_0(ctx context.Context, marshaler runtime.Marshaler, client MlsApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SendGroupMessagesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SendGroupMessages(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MlsApi_SendGroupMessages_0(ctx context.Context, marshaler runtime.Marshaler, server MlsApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SendGroupMessagesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SendGroupMessages(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MlsApi_SendWelcomeMessages_0(ctx context.Context, marshaler runtime.Marshaler, client MlsApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SendWelcomeMessagesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SendWelcomeMessages(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MlsApi_SendWelcomeMessages_0(ctx context.Context, marshaler runtime.Marshaler, server MlsApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SendWelcomeMessagesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SendWelcomeMessages(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MlsApi_RegisterInstallation_0(ctx context.Context, marshaler runtime.Marshaler, client MlsApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterInstallationRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RegisterInstallation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MlsApi_RegisterInstallation_0(ctx context.Context, marshaler runtime.Marshaler, server MlsApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterInstallationRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RegisterInstallation(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MlsApi_UploadKeyPackage_0(ctx context.Context, marshaler runtime.Marshaler, client MlsApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UploadKeyPackageRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UploadKeyPackage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MlsApi_UploadKeyPackage_0(ctx context.Context, marshaler runtime.Marshaler, server MlsApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UploadKeyPackageRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UploadKeyPackage(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MlsApi_FetchKeyPackages_0(ctx context.Context, marshaler runtime.Marshaler, client MlsApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq FetchKeyPackagesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.FetchKeyPackages(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MlsApi_FetchKeyPackages_0(ctx context.Context, marshaler runtime.Marshaler, server MlsApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq FetchKeyPackagesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.FetchKeyPackages(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MlsApi_RevokeInstallation_0(ctx context.Context, marshaler runtime.Marshaler, client MlsApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RevokeInstallationRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RevokeInstallation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MlsApi_RevokeInstallation_0(ctx context.Context, marshaler runtime.Marshaler, server MlsApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RevokeInstallationRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RevokeInstallation(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MlsApi_GetIdentityUpdates_0(ctx context.Context, marshaler runtime.Marshaler, client MlsApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetIdentityUpdatesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetIdentityUpdates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MlsApi_GetIdentityUpdates_0(ctx context.Context, marshaler runtime.Marshaler, server MlsApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetIdentityUpdatesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetIdentityUpdates(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MlsApi_QueryGroupMessages_0(ctx context.Context, marshaler runtime.Marshaler, client MlsApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupMessagesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QueryGroupMessages(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MlsApi_QueryGroupMessages_0(ctx context.Context, marshaler runtime.Marshaler, server MlsApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGroupMessagesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QueryGroupMessages(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MlsApi_QueryWelcomeMessages_0(ctx context.Context, marshaler runtime.Marshaler, client MlsApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWelcomeMessagesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QueryWelcomeMessages(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_MlsApi_QueryWelcomeMessages_0(ctx context.Context, marshaler runtime.Marshaler, server MlsApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWelcomeMessagesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QueryWelcomeMessages(ctx, &protoReq) + return msg, metadata, err + +} + +func request_MlsApi_SubscribeGroupMessages_0(ctx context.Context, marshaler runtime.Marshaler, client MlsApiClient, req *http.Request, pathParams map[string]string) (MlsApi_SubscribeGroupMessagesClient, runtime.ServerMetadata, error) { + var protoReq SubscribeGroupMessagesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.SubscribeGroupMessages(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +func request_MlsApi_SubscribeWelcomeMessages_0(ctx context.Context, marshaler runtime.Marshaler, client MlsApiClient, req *http.Request, pathParams map[string]string) (MlsApi_SubscribeWelcomeMessagesClient, runtime.ServerMetadata, error) { + var protoReq SubscribeWelcomeMessagesRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.SubscribeWelcomeMessages(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +// RegisterMlsApiHandlerServer registers the http handlers for service MlsApi to "mux". +// UnaryRPC :call MlsApiServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMlsApiHandlerFromEndpoint instead. +func RegisterMlsApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MlsApiServer) error { + + mux.Handle("POST", pattern_MlsApi_SendGroupMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/SendGroupMessages", runtime.WithHTTPPathPattern("/mls/v1/send-group-messages")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MlsApi_SendGroupMessages_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_SendGroupMessages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_SendWelcomeMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/SendWelcomeMessages", runtime.WithHTTPPathPattern("/mls/v1/send-welcome-messages")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MlsApi_SendWelcomeMessages_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_SendWelcomeMessages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_RegisterInstallation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/RegisterInstallation", runtime.WithHTTPPathPattern("/mls/v1/register-installation")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MlsApi_RegisterInstallation_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_RegisterInstallation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_UploadKeyPackage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/UploadKeyPackage", runtime.WithHTTPPathPattern("/mls/v1/upload-key-package")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MlsApi_UploadKeyPackage_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_UploadKeyPackage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_FetchKeyPackages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/FetchKeyPackages", runtime.WithHTTPPathPattern("/mls/v1/fetch-key-packages")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MlsApi_FetchKeyPackages_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_FetchKeyPackages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_RevokeInstallation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/RevokeInstallation", runtime.WithHTTPPathPattern("/mls/v1/revoke-installation")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MlsApi_RevokeInstallation_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_RevokeInstallation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_GetIdentityUpdates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/GetIdentityUpdates", runtime.WithHTTPPathPattern("/mls/v1/get-identity-updates")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MlsApi_GetIdentityUpdates_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_GetIdentityUpdates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_QueryGroupMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/QueryGroupMessages", runtime.WithHTTPPathPattern("/mls/v1/query-group-messages")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MlsApi_QueryGroupMessages_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_QueryGroupMessages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_QueryWelcomeMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/QueryWelcomeMessages", runtime.WithHTTPPathPattern("/mls/v1/query-welcome-messages")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MlsApi_QueryWelcomeMessages_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_QueryWelcomeMessages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_SubscribeGroupMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + mux.Handle("POST", pattern_MlsApi_SubscribeWelcomeMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + + return nil +} + +// RegisterMlsApiHandlerFromEndpoint is same as RegisterMlsApiHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMlsApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMlsApiHandler(ctx, mux, conn) +} + +// RegisterMlsApiHandler registers the http handlers for service MlsApi to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMlsApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMlsApiHandlerClient(ctx, mux, NewMlsApiClient(conn)) +} + +// RegisterMlsApiHandlerClient registers the http handlers for service MlsApi +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MlsApiClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MlsApiClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MlsApiClient" to call the correct interceptors. +func RegisterMlsApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MlsApiClient) error { + + mux.Handle("POST", pattern_MlsApi_SendGroupMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/SendGroupMessages", runtime.WithHTTPPathPattern("/mls/v1/send-group-messages")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MlsApi_SendGroupMessages_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_SendGroupMessages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_SendWelcomeMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/SendWelcomeMessages", runtime.WithHTTPPathPattern("/mls/v1/send-welcome-messages")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MlsApi_SendWelcomeMessages_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_SendWelcomeMessages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_RegisterInstallation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/RegisterInstallation", runtime.WithHTTPPathPattern("/mls/v1/register-installation")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MlsApi_RegisterInstallation_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_RegisterInstallation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_UploadKeyPackage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/UploadKeyPackage", runtime.WithHTTPPathPattern("/mls/v1/upload-key-package")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MlsApi_UploadKeyPackage_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_UploadKeyPackage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_FetchKeyPackages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/FetchKeyPackages", runtime.WithHTTPPathPattern("/mls/v1/fetch-key-packages")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MlsApi_FetchKeyPackages_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_FetchKeyPackages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_RevokeInstallation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/RevokeInstallation", runtime.WithHTTPPathPattern("/mls/v1/revoke-installation")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MlsApi_RevokeInstallation_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_RevokeInstallation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_GetIdentityUpdates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/GetIdentityUpdates", runtime.WithHTTPPathPattern("/mls/v1/get-identity-updates")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MlsApi_GetIdentityUpdates_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_GetIdentityUpdates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_QueryGroupMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/QueryGroupMessages", runtime.WithHTTPPathPattern("/mls/v1/query-group-messages")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MlsApi_QueryGroupMessages_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_QueryGroupMessages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_QueryWelcomeMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/QueryWelcomeMessages", runtime.WithHTTPPathPattern("/mls/v1/query-welcome-messages")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MlsApi_QueryWelcomeMessages_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_QueryWelcomeMessages_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_SubscribeGroupMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/SubscribeGroupMessages", runtime.WithHTTPPathPattern("/mls/v1/subscribe-group-messages")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MlsApi_SubscribeGroupMessages_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_SubscribeGroupMessages_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_MlsApi_SubscribeWelcomeMessages_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/xmtp.mls.api.v1.MlsApi/SubscribeWelcomeMessages", runtime.WithHTTPPathPattern("/mls/v1/subscribe-welcome-messages")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MlsApi_SubscribeWelcomeMessages_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_MlsApi_SubscribeWelcomeMessages_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_MlsApi_SendGroupMessages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v1", "send-group-messages"}, "")) + + pattern_MlsApi_SendWelcomeMessages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v1", "send-welcome-messages"}, "")) + + pattern_MlsApi_RegisterInstallation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v1", "register-installation"}, "")) + + pattern_MlsApi_UploadKeyPackage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v1", "upload-key-package"}, "")) + + pattern_MlsApi_FetchKeyPackages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v1", "fetch-key-packages"}, "")) + + pattern_MlsApi_RevokeInstallation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v1", "revoke-installation"}, "")) + + pattern_MlsApi_GetIdentityUpdates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v1", "get-identity-updates"}, "")) + + pattern_MlsApi_QueryGroupMessages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v1", "query-group-messages"}, "")) + + pattern_MlsApi_QueryWelcomeMessages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v1", "query-welcome-messages"}, "")) + + pattern_MlsApi_SubscribeGroupMessages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v1", "subscribe-group-messages"}, "")) + + pattern_MlsApi_SubscribeWelcomeMessages_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v1", "subscribe-welcome-messages"}, "")) +) + +var ( + forward_MlsApi_SendGroupMessages_0 = runtime.ForwardResponseMessage + + forward_MlsApi_SendWelcomeMessages_0 = runtime.ForwardResponseMessage + + forward_MlsApi_RegisterInstallation_0 = runtime.ForwardResponseMessage + + forward_MlsApi_UploadKeyPackage_0 = runtime.ForwardResponseMessage + + forward_MlsApi_FetchKeyPackages_0 = runtime.ForwardResponseMessage + + forward_MlsApi_RevokeInstallation_0 = runtime.ForwardResponseMessage + + forward_MlsApi_GetIdentityUpdates_0 = runtime.ForwardResponseMessage + + forward_MlsApi_QueryGroupMessages_0 = runtime.ForwardResponseMessage + + forward_MlsApi_QueryWelcomeMessages_0 = runtime.ForwardResponseMessage + + forward_MlsApi_SubscribeGroupMessages_0 = runtime.ForwardResponseStream + + forward_MlsApi_SubscribeWelcomeMessages_0 = runtime.ForwardResponseStream +) diff --git a/pkg/proto/mls/api/v1/mls_grpc.pb.go b/pkg/proto/mls/api/v1/mls_grpc.pb.go new file mode 100644 index 00000000..6e1e674d --- /dev/null +++ b/pkg/proto/mls/api/v1/mls_grpc.pb.go @@ -0,0 +1,567 @@ +// Message API + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: mls/api/v1/mls.proto + +package apiv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + MlsApi_SendGroupMessages_FullMethodName = "/xmtp.mls.api.v1.MlsApi/SendGroupMessages" + MlsApi_SendWelcomeMessages_FullMethodName = "/xmtp.mls.api.v1.MlsApi/SendWelcomeMessages" + MlsApi_RegisterInstallation_FullMethodName = "/xmtp.mls.api.v1.MlsApi/RegisterInstallation" + MlsApi_UploadKeyPackage_FullMethodName = "/xmtp.mls.api.v1.MlsApi/UploadKeyPackage" + MlsApi_FetchKeyPackages_FullMethodName = "/xmtp.mls.api.v1.MlsApi/FetchKeyPackages" + MlsApi_RevokeInstallation_FullMethodName = "/xmtp.mls.api.v1.MlsApi/RevokeInstallation" + MlsApi_GetIdentityUpdates_FullMethodName = "/xmtp.mls.api.v1.MlsApi/GetIdentityUpdates" + MlsApi_QueryGroupMessages_FullMethodName = "/xmtp.mls.api.v1.MlsApi/QueryGroupMessages" + MlsApi_QueryWelcomeMessages_FullMethodName = "/xmtp.mls.api.v1.MlsApi/QueryWelcomeMessages" + MlsApi_SubscribeGroupMessages_FullMethodName = "/xmtp.mls.api.v1.MlsApi/SubscribeGroupMessages" + MlsApi_SubscribeWelcomeMessages_FullMethodName = "/xmtp.mls.api.v1.MlsApi/SubscribeWelcomeMessages" +) + +// MlsApiClient is the client API for MlsApi service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MlsApiClient interface { + // Send a MLS payload, that would be validated before being stored to the + // network + SendGroupMessages(ctx context.Context, in *SendGroupMessagesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Send a batch of welcome messages + SendWelcomeMessages(ctx context.Context, in *SendWelcomeMessagesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Register a new installation, which would be validated before storage + RegisterInstallation(ctx context.Context, in *RegisterInstallationRequest, opts ...grpc.CallOption) (*RegisterInstallationResponse, error) + // Upload a new KeyPackage, which would be validated before storage + UploadKeyPackage(ctx context.Context, in *UploadKeyPackageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Get one or more Key Packages by installation_id + FetchKeyPackages(ctx context.Context, in *FetchKeyPackagesRequest, opts ...grpc.CallOption) (*FetchKeyPackagesResponse, error) + // Would delete all key packages associated with the installation and mark + // the installation as having been revoked + RevokeInstallation(ctx context.Context, in *RevokeInstallationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Used to check for changes related to members of a group. + // Would return an array of any new installations associated with the wallet + // address, and any revocations that have happened. + GetIdentityUpdates(ctx context.Context, in *GetIdentityUpdatesRequest, opts ...grpc.CallOption) (*GetIdentityUpdatesResponse, error) + // Query stored group messages + QueryGroupMessages(ctx context.Context, in *QueryGroupMessagesRequest, opts ...grpc.CallOption) (*QueryGroupMessagesResponse, error) + // Query stored group messages + QueryWelcomeMessages(ctx context.Context, in *QueryWelcomeMessagesRequest, opts ...grpc.CallOption) (*QueryWelcomeMessagesResponse, error) + // Subscribe stream of new group messages + SubscribeGroupMessages(ctx context.Context, in *SubscribeGroupMessagesRequest, opts ...grpc.CallOption) (MlsApi_SubscribeGroupMessagesClient, error) + // Subscribe stream of new welcome messages + SubscribeWelcomeMessages(ctx context.Context, in *SubscribeWelcomeMessagesRequest, opts ...grpc.CallOption) (MlsApi_SubscribeWelcomeMessagesClient, error) +} + +type mlsApiClient struct { + cc grpc.ClientConnInterface +} + +func NewMlsApiClient(cc grpc.ClientConnInterface) MlsApiClient { + return &mlsApiClient{cc} +} + +func (c *mlsApiClient) SendGroupMessages(ctx context.Context, in *SendGroupMessagesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, MlsApi_SendGroupMessages_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mlsApiClient) SendWelcomeMessages(ctx context.Context, in *SendWelcomeMessagesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, MlsApi_SendWelcomeMessages_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mlsApiClient) RegisterInstallation(ctx context.Context, in *RegisterInstallationRequest, opts ...grpc.CallOption) (*RegisterInstallationResponse, error) { + out := new(RegisterInstallationResponse) + err := c.cc.Invoke(ctx, MlsApi_RegisterInstallation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mlsApiClient) UploadKeyPackage(ctx context.Context, in *UploadKeyPackageRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, MlsApi_UploadKeyPackage_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mlsApiClient) FetchKeyPackages(ctx context.Context, in *FetchKeyPackagesRequest, opts ...grpc.CallOption) (*FetchKeyPackagesResponse, error) { + out := new(FetchKeyPackagesResponse) + err := c.cc.Invoke(ctx, MlsApi_FetchKeyPackages_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mlsApiClient) RevokeInstallation(ctx context.Context, in *RevokeInstallationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, MlsApi_RevokeInstallation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mlsApiClient) GetIdentityUpdates(ctx context.Context, in *GetIdentityUpdatesRequest, opts ...grpc.CallOption) (*GetIdentityUpdatesResponse, error) { + out := new(GetIdentityUpdatesResponse) + err := c.cc.Invoke(ctx, MlsApi_GetIdentityUpdates_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mlsApiClient) QueryGroupMessages(ctx context.Context, in *QueryGroupMessagesRequest, opts ...grpc.CallOption) (*QueryGroupMessagesResponse, error) { + out := new(QueryGroupMessagesResponse) + err := c.cc.Invoke(ctx, MlsApi_QueryGroupMessages_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mlsApiClient) QueryWelcomeMessages(ctx context.Context, in *QueryWelcomeMessagesRequest, opts ...grpc.CallOption) (*QueryWelcomeMessagesResponse, error) { + out := new(QueryWelcomeMessagesResponse) + err := c.cc.Invoke(ctx, MlsApi_QueryWelcomeMessages_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *mlsApiClient) SubscribeGroupMessages(ctx context.Context, in *SubscribeGroupMessagesRequest, opts ...grpc.CallOption) (MlsApi_SubscribeGroupMessagesClient, error) { + stream, err := c.cc.NewStream(ctx, &MlsApi_ServiceDesc.Streams[0], MlsApi_SubscribeGroupMessages_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &mlsApiSubscribeGroupMessagesClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type MlsApi_SubscribeGroupMessagesClient interface { + Recv() (*GroupMessage, error) + grpc.ClientStream +} + +type mlsApiSubscribeGroupMessagesClient struct { + grpc.ClientStream +} + +func (x *mlsApiSubscribeGroupMessagesClient) Recv() (*GroupMessage, error) { + m := new(GroupMessage) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *mlsApiClient) SubscribeWelcomeMessages(ctx context.Context, in *SubscribeWelcomeMessagesRequest, opts ...grpc.CallOption) (MlsApi_SubscribeWelcomeMessagesClient, error) { + stream, err := c.cc.NewStream(ctx, &MlsApi_ServiceDesc.Streams[1], MlsApi_SubscribeWelcomeMessages_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &mlsApiSubscribeWelcomeMessagesClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type MlsApi_SubscribeWelcomeMessagesClient interface { + Recv() (*WelcomeMessage, error) + grpc.ClientStream +} + +type mlsApiSubscribeWelcomeMessagesClient struct { + grpc.ClientStream +} + +func (x *mlsApiSubscribeWelcomeMessagesClient) Recv() (*WelcomeMessage, error) { + m := new(WelcomeMessage) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// MlsApiServer is the server API for MlsApi service. +// All implementations must embed UnimplementedMlsApiServer +// for forward compatibility +type MlsApiServer interface { + // Send a MLS payload, that would be validated before being stored to the + // network + SendGroupMessages(context.Context, *SendGroupMessagesRequest) (*emptypb.Empty, error) + // Send a batch of welcome messages + SendWelcomeMessages(context.Context, *SendWelcomeMessagesRequest) (*emptypb.Empty, error) + // Register a new installation, which would be validated before storage + RegisterInstallation(context.Context, *RegisterInstallationRequest) (*RegisterInstallationResponse, error) + // Upload a new KeyPackage, which would be validated before storage + UploadKeyPackage(context.Context, *UploadKeyPackageRequest) (*emptypb.Empty, error) + // Get one or more Key Packages by installation_id + FetchKeyPackages(context.Context, *FetchKeyPackagesRequest) (*FetchKeyPackagesResponse, error) + // Would delete all key packages associated with the installation and mark + // the installation as having been revoked + RevokeInstallation(context.Context, *RevokeInstallationRequest) (*emptypb.Empty, error) + // Used to check for changes related to members of a group. + // Would return an array of any new installations associated with the wallet + // address, and any revocations that have happened. + GetIdentityUpdates(context.Context, *GetIdentityUpdatesRequest) (*GetIdentityUpdatesResponse, error) + // Query stored group messages + QueryGroupMessages(context.Context, *QueryGroupMessagesRequest) (*QueryGroupMessagesResponse, error) + // Query stored group messages + QueryWelcomeMessages(context.Context, *QueryWelcomeMessagesRequest) (*QueryWelcomeMessagesResponse, error) + // Subscribe stream of new group messages + SubscribeGroupMessages(*SubscribeGroupMessagesRequest, MlsApi_SubscribeGroupMessagesServer) error + // Subscribe stream of new welcome messages + SubscribeWelcomeMessages(*SubscribeWelcomeMessagesRequest, MlsApi_SubscribeWelcomeMessagesServer) error + mustEmbedUnimplementedMlsApiServer() +} + +// UnimplementedMlsApiServer must be embedded to have forward compatible implementations. +type UnimplementedMlsApiServer struct { +} + +func (UnimplementedMlsApiServer) SendGroupMessages(context.Context, *SendGroupMessagesRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendGroupMessages not implemented") +} +func (UnimplementedMlsApiServer) SendWelcomeMessages(context.Context, *SendWelcomeMessagesRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendWelcomeMessages not implemented") +} +func (UnimplementedMlsApiServer) RegisterInstallation(context.Context, *RegisterInstallationRequest) (*RegisterInstallationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterInstallation not implemented") +} +func (UnimplementedMlsApiServer) UploadKeyPackage(context.Context, *UploadKeyPackageRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UploadKeyPackage not implemented") +} +func (UnimplementedMlsApiServer) FetchKeyPackages(context.Context, *FetchKeyPackagesRequest) (*FetchKeyPackagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchKeyPackages not implemented") +} +func (UnimplementedMlsApiServer) RevokeInstallation(context.Context, *RevokeInstallationRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method RevokeInstallation not implemented") +} +func (UnimplementedMlsApiServer) GetIdentityUpdates(context.Context, *GetIdentityUpdatesRequest) (*GetIdentityUpdatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIdentityUpdates not implemented") +} +func (UnimplementedMlsApiServer) QueryGroupMessages(context.Context, *QueryGroupMessagesRequest) (*QueryGroupMessagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryGroupMessages not implemented") +} +func (UnimplementedMlsApiServer) QueryWelcomeMessages(context.Context, *QueryWelcomeMessagesRequest) (*QueryWelcomeMessagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryWelcomeMessages not implemented") +} +func (UnimplementedMlsApiServer) SubscribeGroupMessages(*SubscribeGroupMessagesRequest, MlsApi_SubscribeGroupMessagesServer) error { + return status.Errorf(codes.Unimplemented, "method SubscribeGroupMessages not implemented") +} +func (UnimplementedMlsApiServer) SubscribeWelcomeMessages(*SubscribeWelcomeMessagesRequest, MlsApi_SubscribeWelcomeMessagesServer) error { + return status.Errorf(codes.Unimplemented, "method SubscribeWelcomeMessages not implemented") +} +func (UnimplementedMlsApiServer) mustEmbedUnimplementedMlsApiServer() {} + +// UnsafeMlsApiServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MlsApiServer will +// result in compilation errors. +type UnsafeMlsApiServer interface { + mustEmbedUnimplementedMlsApiServer() +} + +func RegisterMlsApiServer(s grpc.ServiceRegistrar, srv MlsApiServer) { + s.RegisterService(&MlsApi_ServiceDesc, srv) +} + +func _MlsApi_SendGroupMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendGroupMessagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MlsApiServer).SendGroupMessages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MlsApi_SendGroupMessages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MlsApiServer).SendGroupMessages(ctx, req.(*SendGroupMessagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MlsApi_SendWelcomeMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendWelcomeMessagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MlsApiServer).SendWelcomeMessages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MlsApi_SendWelcomeMessages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MlsApiServer).SendWelcomeMessages(ctx, req.(*SendWelcomeMessagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MlsApi_RegisterInstallation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterInstallationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MlsApiServer).RegisterInstallation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MlsApi_RegisterInstallation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MlsApiServer).RegisterInstallation(ctx, req.(*RegisterInstallationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MlsApi_UploadKeyPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UploadKeyPackageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MlsApiServer).UploadKeyPackage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MlsApi_UploadKeyPackage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MlsApiServer).UploadKeyPackage(ctx, req.(*UploadKeyPackageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MlsApi_FetchKeyPackages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchKeyPackagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MlsApiServer).FetchKeyPackages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MlsApi_FetchKeyPackages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MlsApiServer).FetchKeyPackages(ctx, req.(*FetchKeyPackagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MlsApi_RevokeInstallation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RevokeInstallationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MlsApiServer).RevokeInstallation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MlsApi_RevokeInstallation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MlsApiServer).RevokeInstallation(ctx, req.(*RevokeInstallationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MlsApi_GetIdentityUpdates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetIdentityUpdatesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MlsApiServer).GetIdentityUpdates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MlsApi_GetIdentityUpdates_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MlsApiServer).GetIdentityUpdates(ctx, req.(*GetIdentityUpdatesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MlsApi_QueryGroupMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupMessagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MlsApiServer).QueryGroupMessages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MlsApi_QueryGroupMessages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MlsApiServer).QueryGroupMessages(ctx, req.(*QueryGroupMessagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MlsApi_QueryWelcomeMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWelcomeMessagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MlsApiServer).QueryWelcomeMessages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: MlsApi_QueryWelcomeMessages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MlsApiServer).QueryWelcomeMessages(ctx, req.(*QueryWelcomeMessagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MlsApi_SubscribeGroupMessages_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscribeGroupMessagesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(MlsApiServer).SubscribeGroupMessages(m, &mlsApiSubscribeGroupMessagesServer{stream}) +} + +type MlsApi_SubscribeGroupMessagesServer interface { + Send(*GroupMessage) error + grpc.ServerStream +} + +type mlsApiSubscribeGroupMessagesServer struct { + grpc.ServerStream +} + +func (x *mlsApiSubscribeGroupMessagesServer) Send(m *GroupMessage) error { + return x.ServerStream.SendMsg(m) +} + +func _MlsApi_SubscribeWelcomeMessages_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscribeWelcomeMessagesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(MlsApiServer).SubscribeWelcomeMessages(m, &mlsApiSubscribeWelcomeMessagesServer{stream}) +} + +type MlsApi_SubscribeWelcomeMessagesServer interface { + Send(*WelcomeMessage) error + grpc.ServerStream +} + +type mlsApiSubscribeWelcomeMessagesServer struct { + grpc.ServerStream +} + +func (x *mlsApiSubscribeWelcomeMessagesServer) Send(m *WelcomeMessage) error { + return x.ServerStream.SendMsg(m) +} + +// MlsApi_ServiceDesc is the grpc.ServiceDesc for MlsApi service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var MlsApi_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "xmtp.mls.api.v1.MlsApi", + HandlerType: (*MlsApiServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SendGroupMessages", + Handler: _MlsApi_SendGroupMessages_Handler, + }, + { + MethodName: "SendWelcomeMessages", + Handler: _MlsApi_SendWelcomeMessages_Handler, + }, + { + MethodName: "RegisterInstallation", + Handler: _MlsApi_RegisterInstallation_Handler, + }, + { + MethodName: "UploadKeyPackage", + Handler: _MlsApi_UploadKeyPackage_Handler, + }, + { + MethodName: "FetchKeyPackages", + Handler: _MlsApi_FetchKeyPackages_Handler, + }, + { + MethodName: "RevokeInstallation", + Handler: _MlsApi_RevokeInstallation_Handler, + }, + { + MethodName: "GetIdentityUpdates", + Handler: _MlsApi_GetIdentityUpdates_Handler, + }, + { + MethodName: "QueryGroupMessages", + Handler: _MlsApi_QueryGroupMessages_Handler, + }, + { + MethodName: "QueryWelcomeMessages", + Handler: _MlsApi_QueryWelcomeMessages_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "SubscribeGroupMessages", + Handler: _MlsApi_SubscribeGroupMessages_Handler, + ServerStreams: true, + }, + { + StreamName: "SubscribeWelcomeMessages", + Handler: _MlsApi_SubscribeWelcomeMessages_Handler, + ServerStreams: true, + }, + }, + Metadata: "mls/api/v1/mls.proto", +} diff --git a/pkg/proto/mls/database/intents.pb.go b/pkg/proto/mls/database/intents.pb.go new file mode 100644 index 00000000..420ecd00 --- /dev/null +++ b/pkg/proto/mls/database/intents.pb.go @@ -0,0 +1,983 @@ +// V3 invite message structure + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: mls/database/intents.proto + +package database + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The data required to publish a message +type SendMessageData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *SendMessageData_V1_ + Version isSendMessageData_Version `protobuf_oneof:"version"` +} + +func (x *SendMessageData) Reset() { + *x = SendMessageData{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendMessageData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMessageData) ProtoMessage() {} + +func (x *SendMessageData) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_proto_msgTypes[0] + 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 SendMessageData.ProtoReflect.Descriptor instead. +func (*SendMessageData) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{0} +} + +func (m *SendMessageData) GetVersion() isSendMessageData_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *SendMessageData) GetV1() *SendMessageData_V1 { + if x, ok := x.GetVersion().(*SendMessageData_V1_); ok { + return x.V1 + } + return nil +} + +type isSendMessageData_Version interface { + isSendMessageData_Version() +} + +type SendMessageData_V1_ struct { + V1 *SendMessageData_V1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*SendMessageData_V1_) isSendMessageData_Version() {} + +// Wrapper around a list af repeated EVM Account Addresses +type AccountAddresses struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountAddresses []string `protobuf:"bytes,1,rep,name=account_addresses,json=accountAddresses,proto3" json:"account_addresses,omitempty"` +} + +func (x *AccountAddresses) Reset() { + *x = AccountAddresses{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountAddresses) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountAddresses) ProtoMessage() {} + +func (x *AccountAddresses) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_proto_msgTypes[1] + 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 AccountAddresses.ProtoReflect.Descriptor instead. +func (*AccountAddresses) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{1} +} + +func (x *AccountAddresses) GetAccountAddresses() []string { + if x != nil { + return x.AccountAddresses + } + return nil +} + +// Wrapper around a list of repeated Installation IDs +type InstallationIds struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstallationIds [][]byte `protobuf:"bytes,1,rep,name=installation_ids,json=installationIds,proto3" json:"installation_ids,omitempty"` +} + +func (x *InstallationIds) Reset() { + *x = InstallationIds{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InstallationIds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InstallationIds) ProtoMessage() {} + +func (x *InstallationIds) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_proto_msgTypes[2] + 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 InstallationIds.ProtoReflect.Descriptor instead. +func (*InstallationIds) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{2} +} + +func (x *InstallationIds) GetInstallationIds() [][]byte { + if x != nil { + return x.InstallationIds + } + return nil +} + +// One of an EVM account address or Installation ID +type AddressesOrInstallationIds struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to AddressesOrInstallationIds: + // + // *AddressesOrInstallationIds_AccountAddresses + // *AddressesOrInstallationIds_InstallationIds + AddressesOrInstallationIds isAddressesOrInstallationIds_AddressesOrInstallationIds `protobuf_oneof:"addresses_or_installation_ids"` +} + +func (x *AddressesOrInstallationIds) Reset() { + *x = AddressesOrInstallationIds{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddressesOrInstallationIds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddressesOrInstallationIds) ProtoMessage() {} + +func (x *AddressesOrInstallationIds) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_proto_msgTypes[3] + 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 AddressesOrInstallationIds.ProtoReflect.Descriptor instead. +func (*AddressesOrInstallationIds) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{3} +} + +func (m *AddressesOrInstallationIds) GetAddressesOrInstallationIds() isAddressesOrInstallationIds_AddressesOrInstallationIds { + if m != nil { + return m.AddressesOrInstallationIds + } + return nil +} + +func (x *AddressesOrInstallationIds) GetAccountAddresses() *AccountAddresses { + if x, ok := x.GetAddressesOrInstallationIds().(*AddressesOrInstallationIds_AccountAddresses); ok { + return x.AccountAddresses + } + return nil +} + +func (x *AddressesOrInstallationIds) GetInstallationIds() *InstallationIds { + if x, ok := x.GetAddressesOrInstallationIds().(*AddressesOrInstallationIds_InstallationIds); ok { + return x.InstallationIds + } + return nil +} + +type isAddressesOrInstallationIds_AddressesOrInstallationIds interface { + isAddressesOrInstallationIds_AddressesOrInstallationIds() +} + +type AddressesOrInstallationIds_AccountAddresses struct { + AccountAddresses *AccountAddresses `protobuf:"bytes,1,opt,name=account_addresses,json=accountAddresses,proto3,oneof"` +} + +type AddressesOrInstallationIds_InstallationIds struct { + InstallationIds *InstallationIds `protobuf:"bytes,2,opt,name=installation_ids,json=installationIds,proto3,oneof"` +} + +func (*AddressesOrInstallationIds_AccountAddresses) isAddressesOrInstallationIds_AddressesOrInstallationIds() { +} + +func (*AddressesOrInstallationIds_InstallationIds) isAddressesOrInstallationIds_AddressesOrInstallationIds() { +} + +// The data required to add members to a group +type AddMembersData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *AddMembersData_V1_ + Version isAddMembersData_Version `protobuf_oneof:"version"` +} + +func (x *AddMembersData) Reset() { + *x = AddMembersData{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddMembersData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddMembersData) ProtoMessage() {} + +func (x *AddMembersData) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_proto_msgTypes[4] + 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 AddMembersData.ProtoReflect.Descriptor instead. +func (*AddMembersData) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{4} +} + +func (m *AddMembersData) GetVersion() isAddMembersData_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *AddMembersData) GetV1() *AddMembersData_V1 { + if x, ok := x.GetVersion().(*AddMembersData_V1_); ok { + return x.V1 + } + return nil +} + +type isAddMembersData_Version interface { + isAddMembersData_Version() +} + +type AddMembersData_V1_ struct { + V1 *AddMembersData_V1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*AddMembersData_V1_) isAddMembersData_Version() {} + +// The data required to remove members from a group +type RemoveMembersData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *RemoveMembersData_V1_ + Version isRemoveMembersData_Version `protobuf_oneof:"version"` +} + +func (x *RemoveMembersData) Reset() { + *x = RemoveMembersData{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveMembersData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveMembersData) ProtoMessage() {} + +func (x *RemoveMembersData) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_proto_msgTypes[5] + 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 RemoveMembersData.ProtoReflect.Descriptor instead. +func (*RemoveMembersData) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{5} +} + +func (m *RemoveMembersData) GetVersion() isRemoveMembersData_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *RemoveMembersData) GetV1() *RemoveMembersData_V1 { + if x, ok := x.GetVersion().(*RemoveMembersData_V1_); ok { + return x.V1 + } + return nil +} + +type isRemoveMembersData_Version interface { + isRemoveMembersData_Version() +} + +type RemoveMembersData_V1_ struct { + V1 *RemoveMembersData_V1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*RemoveMembersData_V1_) isRemoveMembersData_Version() {} + +// Generic data-type for all post-commit actions +type PostCommitAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Kind: + // + // *PostCommitAction_SendWelcomes_ + Kind isPostCommitAction_Kind `protobuf_oneof:"kind"` +} + +func (x *PostCommitAction) Reset() { + *x = PostCommitAction{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostCommitAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostCommitAction) ProtoMessage() {} + +func (x *PostCommitAction) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_proto_msgTypes[6] + 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 PostCommitAction.ProtoReflect.Descriptor instead. +func (*PostCommitAction) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{6} +} + +func (m *PostCommitAction) GetKind() isPostCommitAction_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (x *PostCommitAction) GetSendWelcomes() *PostCommitAction_SendWelcomes { + if x, ok := x.GetKind().(*PostCommitAction_SendWelcomes_); ok { + return x.SendWelcomes + } + return nil +} + +type isPostCommitAction_Kind interface { + isPostCommitAction_Kind() +} + +type PostCommitAction_SendWelcomes_ struct { + SendWelcomes *PostCommitAction_SendWelcomes `protobuf:"bytes,1,opt,name=send_welcomes,json=sendWelcomes,proto3,oneof"` +} + +func (*PostCommitAction_SendWelcomes_) isPostCommitAction_Kind() {} + +// V1 of SendMessagePublishData +type SendMessageData_V1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PayloadBytes []byte `protobuf:"bytes,1,opt,name=payload_bytes,json=payloadBytes,proto3" json:"payload_bytes,omitempty"` +} + +func (x *SendMessageData_V1) Reset() { + *x = SendMessageData_V1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendMessageData_V1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendMessageData_V1) ProtoMessage() {} + +func (x *SendMessageData_V1) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_proto_msgTypes[7] + 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 SendMessageData_V1.ProtoReflect.Descriptor instead. +func (*SendMessageData_V1) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *SendMessageData_V1) GetPayloadBytes() []byte { + if x != nil { + return x.PayloadBytes + } + return nil +} + +// V1 of AddMembersPublishData +type AddMembersData_V1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AddressesOrInstallationIds *AddressesOrInstallationIds `protobuf:"bytes,1,opt,name=addresses_or_installation_ids,json=addressesOrInstallationIds,proto3" json:"addresses_or_installation_ids,omitempty"` +} + +func (x *AddMembersData_V1) Reset() { + *x = AddMembersData_V1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddMembersData_V1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddMembersData_V1) ProtoMessage() {} + +func (x *AddMembersData_V1) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_proto_msgTypes[8] + 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 AddMembersData_V1.ProtoReflect.Descriptor instead. +func (*AddMembersData_V1) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *AddMembersData_V1) GetAddressesOrInstallationIds() *AddressesOrInstallationIds { + if x != nil { + return x.AddressesOrInstallationIds + } + return nil +} + +// V1 of RemoveMembersPublishData +type RemoveMembersData_V1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AddressesOrInstallationIds *AddressesOrInstallationIds `protobuf:"bytes,1,opt,name=addresses_or_installation_ids,json=addressesOrInstallationIds,proto3" json:"addresses_or_installation_ids,omitempty"` +} + +func (x *RemoveMembersData_V1) Reset() { + *x = RemoveMembersData_V1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveMembersData_V1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveMembersData_V1) ProtoMessage() {} + +func (x *RemoveMembersData_V1) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_proto_msgTypes[9] + 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 RemoveMembersData_V1.ProtoReflect.Descriptor instead. +func (*RemoveMembersData_V1) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *RemoveMembersData_V1) GetAddressesOrInstallationIds() *AddressesOrInstallationIds { + if x != nil { + return x.AddressesOrInstallationIds + } + return nil +} + +// SendWelcome message +type PostCommitAction_SendWelcomes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstallationIds [][]byte `protobuf:"bytes,1,rep,name=installation_ids,json=installationIds,proto3" json:"installation_ids,omitempty"` + WelcomeMessage []byte `protobuf:"bytes,2,opt,name=welcome_message,json=welcomeMessage,proto3" json:"welcome_message,omitempty"` +} + +func (x *PostCommitAction_SendWelcomes) Reset() { + *x = PostCommitAction_SendWelcomes{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostCommitAction_SendWelcomes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostCommitAction_SendWelcomes) ProtoMessage() {} + +func (x *PostCommitAction_SendWelcomes) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_proto_msgTypes[10] + 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 PostCommitAction_SendWelcomes.ProtoReflect.Descriptor instead. +func (*PostCommitAction_SendWelcomes) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *PostCommitAction_SendWelcomes) GetInstallationIds() [][]byte { + if x != nil { + return x.InstallationIds + } + return nil +} + +func (x *PostCommitAction_SendWelcomes) GetWelcomeMessage() []byte { + if x != nil { + return x.WelcomeMessage + } + return nil +} + +var File_mls_database_intents_proto protoreflect.FileDescriptor + +var file_mls_database_intents_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x6d, 0x6c, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, + 0x80, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x37, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x1a, 0x29, 0x0a, 0x02, + 0x56, 0x31, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0x3f, 0x0a, 0x10, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x10, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, + 0x52, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x73, 0x22, 0xe2, 0x01, 0x0a, 0x1a, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x4f, + 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, + 0x12, 0x52, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x48, 0x00, 0x52, 0x10, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x42, 0x1f, 0x0a, 0x1d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x65, 0x73, 0x5f, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x22, 0xcb, 0x01, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x02, 0x76, 0x31, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, + 0x31, 0x1a, 0x76, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x70, 0x0a, 0x1d, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x65, 0x73, 0x5f, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x4f, 0x72, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x52, 0x1a, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x4f, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd1, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x02, 0x76, 0x31, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, + 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x31, 0x48, + 0x00, 0x52, 0x02, 0x76, 0x31, 0x1a, 0x76, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x70, 0x0a, 0x1d, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x5f, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x4f, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x73, 0x52, 0x1a, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x4f, 0x72, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x42, 0x09, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd7, 0x01, 0x0a, 0x10, 0x50, 0x6f, 0x73, + 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, + 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x77, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x57, 0x65, + 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x57, 0x65, + 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x73, 0x1a, 0x62, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x57, 0x65, + 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, + 0x52, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x5f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x77, 0x65, 0x6c, 0x63, + 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x42, 0xc0, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x6d, 0x6c, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x42, 0x0c, 0x49, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, + 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x44, 0xaa, 0x02, 0x11, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, + 0x6c, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0xca, 0x02, 0x11, 0x58, 0x6d, + 0x74, 0x70, 0x5c, 0x4d, 0x6c, 0x73, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0xe2, + 0x02, 0x1d, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x6c, 0x73, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x13, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x6c, 0x73, 0x3a, 0x3a, 0x44, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mls_database_intents_proto_rawDescOnce sync.Once + file_mls_database_intents_proto_rawDescData = file_mls_database_intents_proto_rawDesc +) + +func file_mls_database_intents_proto_rawDescGZIP() []byte { + file_mls_database_intents_proto_rawDescOnce.Do(func() { + file_mls_database_intents_proto_rawDescData = protoimpl.X.CompressGZIP(file_mls_database_intents_proto_rawDescData) + }) + return file_mls_database_intents_proto_rawDescData +} + +var file_mls_database_intents_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_mls_database_intents_proto_goTypes = []interface{}{ + (*SendMessageData)(nil), // 0: xmtp.mls.database.SendMessageData + (*AccountAddresses)(nil), // 1: xmtp.mls.database.AccountAddresses + (*InstallationIds)(nil), // 2: xmtp.mls.database.InstallationIds + (*AddressesOrInstallationIds)(nil), // 3: xmtp.mls.database.AddressesOrInstallationIds + (*AddMembersData)(nil), // 4: xmtp.mls.database.AddMembersData + (*RemoveMembersData)(nil), // 5: xmtp.mls.database.RemoveMembersData + (*PostCommitAction)(nil), // 6: xmtp.mls.database.PostCommitAction + (*SendMessageData_V1)(nil), // 7: xmtp.mls.database.SendMessageData.V1 + (*AddMembersData_V1)(nil), // 8: xmtp.mls.database.AddMembersData.V1 + (*RemoveMembersData_V1)(nil), // 9: xmtp.mls.database.RemoveMembersData.V1 + (*PostCommitAction_SendWelcomes)(nil), // 10: xmtp.mls.database.PostCommitAction.SendWelcomes +} +var file_mls_database_intents_proto_depIdxs = []int32{ + 7, // 0: xmtp.mls.database.SendMessageData.v1:type_name -> xmtp.mls.database.SendMessageData.V1 + 1, // 1: xmtp.mls.database.AddressesOrInstallationIds.account_addresses:type_name -> xmtp.mls.database.AccountAddresses + 2, // 2: xmtp.mls.database.AddressesOrInstallationIds.installation_ids:type_name -> xmtp.mls.database.InstallationIds + 8, // 3: xmtp.mls.database.AddMembersData.v1:type_name -> xmtp.mls.database.AddMembersData.V1 + 9, // 4: xmtp.mls.database.RemoveMembersData.v1:type_name -> xmtp.mls.database.RemoveMembersData.V1 + 10, // 5: xmtp.mls.database.PostCommitAction.send_welcomes:type_name -> xmtp.mls.database.PostCommitAction.SendWelcomes + 3, // 6: xmtp.mls.database.AddMembersData.V1.addresses_or_installation_ids:type_name -> xmtp.mls.database.AddressesOrInstallationIds + 3, // 7: xmtp.mls.database.RemoveMembersData.V1.addresses_or_installation_ids:type_name -> xmtp.mls.database.AddressesOrInstallationIds + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_mls_database_intents_proto_init() } +func file_mls_database_intents_proto_init() { + if File_mls_database_intents_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mls_database_intents_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendMessageData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_database_intents_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountAddresses); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_database_intents_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InstallationIds); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_database_intents_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddressesOrInstallationIds); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_database_intents_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddMembersData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_database_intents_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveMembersData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_database_intents_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostCommitAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_database_intents_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendMessageData_V1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_database_intents_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddMembersData_V1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_database_intents_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveMembersData_V1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_database_intents_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostCommitAction_SendWelcomes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_mls_database_intents_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*SendMessageData_V1_)(nil), + } + file_mls_database_intents_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*AddressesOrInstallationIds_AccountAddresses)(nil), + (*AddressesOrInstallationIds_InstallationIds)(nil), + } + file_mls_database_intents_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*AddMembersData_V1_)(nil), + } + file_mls_database_intents_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*RemoveMembersData_V1_)(nil), + } + file_mls_database_intents_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*PostCommitAction_SendWelcomes_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mls_database_intents_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mls_database_intents_proto_goTypes, + DependencyIndexes: file_mls_database_intents_proto_depIdxs, + MessageInfos: file_mls_database_intents_proto_msgTypes, + }.Build() + File_mls_database_intents_proto = out.File + file_mls_database_intents_proto_rawDesc = nil + file_mls_database_intents_proto_goTypes = nil + file_mls_database_intents_proto_depIdxs = nil +} diff --git a/pkg/proto/mls/message_contents/association.pb.go b/pkg/proto/mls/message_contents/association.pb.go new file mode 100644 index 00000000..011dab4f --- /dev/null +++ b/pkg/proto/mls/message_contents/association.pb.go @@ -0,0 +1,389 @@ +// Associations and signatures + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: mls/message_contents/association.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Allows for us to update the format of the association text without +// incrementing the entire proto +type AssociationTextVersion int32 + +const ( + AssociationTextVersion_ASSOCIATION_TEXT_VERSION_UNSPECIFIED AssociationTextVersion = 0 + AssociationTextVersion_ASSOCIATION_TEXT_VERSION_1 AssociationTextVersion = 1 +) + +// Enum value maps for AssociationTextVersion. +var ( + AssociationTextVersion_name = map[int32]string{ + 0: "ASSOCIATION_TEXT_VERSION_UNSPECIFIED", + 1: "ASSOCIATION_TEXT_VERSION_1", + } + AssociationTextVersion_value = map[string]int32{ + "ASSOCIATION_TEXT_VERSION_UNSPECIFIED": 0, + "ASSOCIATION_TEXT_VERSION_1": 1, + } +) + +func (x AssociationTextVersion) Enum() *AssociationTextVersion { + p := new(AssociationTextVersion) + *p = x + return p +} + +func (x AssociationTextVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AssociationTextVersion) Descriptor() protoreflect.EnumDescriptor { + return file_mls_message_contents_association_proto_enumTypes[0].Descriptor() +} + +func (AssociationTextVersion) Type() protoreflect.EnumType { + return &file_mls_message_contents_association_proto_enumTypes[0] +} + +func (x AssociationTextVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AssociationTextVersion.Descriptor instead. +func (AssociationTextVersion) EnumDescriptor() ([]byte, []int) { + return file_mls_message_contents_association_proto_rawDescGZIP(), []int{0} +} + +// EIP191Association is used for all EIP 191 compliant wallet signatures +type Eip191Association struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AssociationTextVersion AssociationTextVersion `protobuf:"varint,1,opt,name=association_text_version,json=associationTextVersion,proto3,enum=xmtp.mls.message_contents.AssociationTextVersion" json:"association_text_version,omitempty"` + Signature *RecoverableEcdsaSignature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + AccountAddress string `protobuf:"bytes,3,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + Iso8601Time string `protobuf:"bytes,4,opt,name=iso8601_time,json=iso8601Time,proto3" json:"iso8601_time,omitempty"` +} + +func (x *Eip191Association) Reset() { + *x = Eip191Association{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_association_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Eip191Association) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Eip191Association) ProtoMessage() {} + +func (x *Eip191Association) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_association_proto_msgTypes[0] + 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 Eip191Association.ProtoReflect.Descriptor instead. +func (*Eip191Association) Descriptor() ([]byte, []int) { + return file_mls_message_contents_association_proto_rawDescGZIP(), []int{0} +} + +func (x *Eip191Association) GetAssociationTextVersion() AssociationTextVersion { + if x != nil { + return x.AssociationTextVersion + } + return AssociationTextVersion_ASSOCIATION_TEXT_VERSION_UNSPECIFIED +} + +func (x *Eip191Association) GetSignature() *RecoverableEcdsaSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Eip191Association) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +func (x *Eip191Association) GetIso8601Time() string { + if x != nil { + return x.Iso8601Time + } + return "" +} + +// RecoverableEcdsaSignature +type RecoverableEcdsaSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Includes recovery id as the last byte + Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` +} + +func (x *RecoverableEcdsaSignature) Reset() { + *x = RecoverableEcdsaSignature{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_association_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecoverableEcdsaSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecoverableEcdsaSignature) ProtoMessage() {} + +func (x *RecoverableEcdsaSignature) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_association_proto_msgTypes[1] + 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 RecoverableEcdsaSignature.ProtoReflect.Descriptor instead. +func (*RecoverableEcdsaSignature) Descriptor() ([]byte, []int) { + return file_mls_message_contents_association_proto_rawDescGZIP(), []int{1} +} + +func (x *RecoverableEcdsaSignature) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +// EdDSA signature bytes matching RFC 8032 +type EdDsaSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` +} + +func (x *EdDsaSignature) Reset() { + *x = EdDsaSignature{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_association_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EdDsaSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EdDsaSignature) ProtoMessage() {} + +func (x *EdDsaSignature) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_association_proto_msgTypes[2] + 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 EdDsaSignature.ProtoReflect.Descriptor instead. +func (*EdDsaSignature) Descriptor() ([]byte, []int) { + return file_mls_message_contents_association_proto_rawDescGZIP(), []int{2} +} + +func (x *EdDsaSignature) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +var File_mls_message_contents_association_proto protoreflect.FileDescriptor + +var file_mls_message_contents_association_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6d, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, + 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x22, 0xa0, 0x02, 0x0a, 0x11, 0x45, 0x69, 0x70, 0x31, 0x39, 0x31, 0x41, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6b, 0x0a, 0x18, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x78, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x16, + 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x78, 0x74, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x62, 0x6c, + 0x65, 0x45, 0x63, 0x64, 0x73, 0x61, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x6f, 0x38, 0x36, 0x30, 0x31, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x73, 0x6f, 0x38, 0x36, + 0x30, 0x31, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x31, 0x0a, 0x19, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x63, 0x64, 0x73, 0x61, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x26, 0x0a, 0x0e, 0x45, 0x64, 0x44, + 0x73, 0x61, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x2a, 0x62, 0x0a, 0x16, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x65, 0x78, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x24, 0x41, + 0x53, 0x53, 0x4f, 0x43, 0x49, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x5f, + 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x53, 0x53, 0x4f, 0x43, 0x49, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, + 0x4e, 0x5f, 0x31, 0x10, 0x01, 0x42, 0xf0, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x10, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, + 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x4d, 0xaa, 0x02, + 0x18, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x18, 0x58, 0x6d, 0x74, 0x70, + 0x5c, 0x4d, 0x6c, 0x73, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x24, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x6c, 0x73, 0x5c, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1a, 0x58, 0x6d, + 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x6c, 0x73, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mls_message_contents_association_proto_rawDescOnce sync.Once + file_mls_message_contents_association_proto_rawDescData = file_mls_message_contents_association_proto_rawDesc +) + +func file_mls_message_contents_association_proto_rawDescGZIP() []byte { + file_mls_message_contents_association_proto_rawDescOnce.Do(func() { + file_mls_message_contents_association_proto_rawDescData = protoimpl.X.CompressGZIP(file_mls_message_contents_association_proto_rawDescData) + }) + return file_mls_message_contents_association_proto_rawDescData +} + +var file_mls_message_contents_association_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_mls_message_contents_association_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_mls_message_contents_association_proto_goTypes = []interface{}{ + (AssociationTextVersion)(0), // 0: xmtp.mls.message_contents.AssociationTextVersion + (*Eip191Association)(nil), // 1: xmtp.mls.message_contents.Eip191Association + (*RecoverableEcdsaSignature)(nil), // 2: xmtp.mls.message_contents.RecoverableEcdsaSignature + (*EdDsaSignature)(nil), // 3: xmtp.mls.message_contents.EdDsaSignature +} +var file_mls_message_contents_association_proto_depIdxs = []int32{ + 0, // 0: xmtp.mls.message_contents.Eip191Association.association_text_version:type_name -> xmtp.mls.message_contents.AssociationTextVersion + 2, // 1: xmtp.mls.message_contents.Eip191Association.signature:type_name -> xmtp.mls.message_contents.RecoverableEcdsaSignature + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_mls_message_contents_association_proto_init() } +func file_mls_message_contents_association_proto_init() { + if File_mls_message_contents_association_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mls_message_contents_association_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Eip191Association); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_association_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RecoverableEcdsaSignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_association_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EdDsaSignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mls_message_contents_association_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mls_message_contents_association_proto_goTypes, + DependencyIndexes: file_mls_message_contents_association_proto_depIdxs, + EnumInfos: file_mls_message_contents_association_proto_enumTypes, + MessageInfos: file_mls_message_contents_association_proto_msgTypes, + }.Build() + File_mls_message_contents_association_proto = out.File + file_mls_message_contents_association_proto_rawDesc = nil + file_mls_message_contents_association_proto_goTypes = nil + file_mls_message_contents_association_proto_depIdxs = nil +} diff --git a/pkg/proto/mls/message_contents/content.pb.go b/pkg/proto/mls/message_contents/content.pb.go new file mode 100644 index 00000000..ee31ca09 --- /dev/null +++ b/pkg/proto/mls/message_contents/content.pb.go @@ -0,0 +1,380 @@ +// Message content encoding structures +// Copied from V2 code so that we can eventually retire all V2 message content + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: mls/message_contents/content.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Recognized compression algorithms +// protolint:disable ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH +type Compression int32 + +const ( + Compression_COMPRESSION_DEFLATE Compression = 0 + Compression_COMPRESSION_GZIP Compression = 1 +) + +// Enum value maps for Compression. +var ( + Compression_name = map[int32]string{ + 0: "COMPRESSION_DEFLATE", + 1: "COMPRESSION_GZIP", + } + Compression_value = map[string]int32{ + "COMPRESSION_DEFLATE": 0, + "COMPRESSION_GZIP": 1, + } +) + +func (x Compression) Enum() *Compression { + p := new(Compression) + *p = x + return p +} + +func (x Compression) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Compression) Descriptor() protoreflect.EnumDescriptor { + return file_mls_message_contents_content_proto_enumTypes[0].Descriptor() +} + +func (Compression) Type() protoreflect.EnumType { + return &file_mls_message_contents_content_proto_enumTypes[0] +} + +func (x Compression) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Compression.Descriptor instead. +func (Compression) EnumDescriptor() ([]byte, []int) { + return file_mls_message_contents_content_proto_rawDescGZIP(), []int{0} +} + +// ContentTypeId is used to identify the type of content stored in a Message. +type ContentTypeId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AuthorityId string `protobuf:"bytes,1,opt,name=authority_id,json=authorityId,proto3" json:"authority_id,omitempty"` // authority governing this content type + TypeId string `protobuf:"bytes,2,opt,name=type_id,json=typeId,proto3" json:"type_id,omitempty"` // type identifier + VersionMajor uint32 `protobuf:"varint,3,opt,name=version_major,json=versionMajor,proto3" json:"version_major,omitempty"` // major version of the type + VersionMinor uint32 `protobuf:"varint,4,opt,name=version_minor,json=versionMinor,proto3" json:"version_minor,omitempty"` // minor version of the type +} + +func (x *ContentTypeId) Reset() { + *x = ContentTypeId{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_content_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContentTypeId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContentTypeId) ProtoMessage() {} + +func (x *ContentTypeId) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_content_proto_msgTypes[0] + 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 ContentTypeId.ProtoReflect.Descriptor instead. +func (*ContentTypeId) Descriptor() ([]byte, []int) { + return file_mls_message_contents_content_proto_rawDescGZIP(), []int{0} +} + +func (x *ContentTypeId) GetAuthorityId() string { + if x != nil { + return x.AuthorityId + } + return "" +} + +func (x *ContentTypeId) GetTypeId() string { + if x != nil { + return x.TypeId + } + return "" +} + +func (x *ContentTypeId) GetVersionMajor() uint32 { + if x != nil { + return x.VersionMajor + } + return 0 +} + +func (x *ContentTypeId) GetVersionMinor() uint32 { + if x != nil { + return x.VersionMinor + } + return 0 +} + +// EncodedContent bundles the content with metadata identifying its type +// and parameters required for correct decoding and presentation of the content. +type EncodedContent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // content type identifier used to match the payload with + // the correct decoding machinery + Type *ContentTypeId `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // optional encoding parameters required to correctly decode the content + Parameters map[string]string `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // optional fallback description of the content that can be used in case + // the client cannot decode or render the content + Fallback *string `protobuf:"bytes,3,opt,name=fallback,proto3,oneof" json:"fallback,omitempty"` + // optional compression; the value indicates algorithm used to + // compress the encoded content bytes + Compression *Compression `protobuf:"varint,5,opt,name=compression,proto3,enum=xmtp.mls.message_contents.Compression,oneof" json:"compression,omitempty"` + // encoded content itself + Content []byte `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` +} + +func (x *EncodedContent) Reset() { + *x = EncodedContent{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_content_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EncodedContent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncodedContent) ProtoMessage() {} + +func (x *EncodedContent) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_content_proto_msgTypes[1] + 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 EncodedContent.ProtoReflect.Descriptor instead. +func (*EncodedContent) Descriptor() ([]byte, []int) { + return file_mls_message_contents_content_proto_rawDescGZIP(), []int{1} +} + +func (x *EncodedContent) GetType() *ContentTypeId { + if x != nil { + return x.Type + } + return nil +} + +func (x *EncodedContent) GetParameters() map[string]string { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *EncodedContent) GetFallback() string { + if x != nil && x.Fallback != nil { + return *x.Fallback + } + return "" +} + +func (x *EncodedContent) GetCompression() Compression { + if x != nil && x.Compression != nil { + return *x.Compression + } + return Compression_COMPRESSION_DEFLATE +} + +func (x *EncodedContent) GetContent() []byte { + if x != nil { + return x.Content + } + return nil +} + +var File_mls_message_contents_content_proto protoreflect.FileDescriptor + +var file_mls_message_contents_content_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x6d, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, + 0x95, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x49, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, + 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6a, + 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, + 0x6e, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x6f, 0x72, 0x22, 0x8f, 0x03, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x6f, + 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x49, 0x64, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x08, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x48, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x88, 0x01, 0x01, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x3d, 0x0a, + 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x3c, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, + 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x46, 0x4c, 0x41, 0x54, 0x45, 0x10, + 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, + 0x5f, 0x47, 0x5a, 0x49, 0x50, 0x10, 0x01, 0x42, 0xec, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, + 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, + 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x4d, 0xaa, 0x02, 0x18, 0x58, + 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x18, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, + 0x6c, 0x73, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0xe2, 0x02, 0x24, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x6c, 0x73, 0x5c, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1a, 0x58, 0x6d, 0x74, 0x70, + 0x3a, 0x3a, 0x4d, 0x6c, 0x73, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mls_message_contents_content_proto_rawDescOnce sync.Once + file_mls_message_contents_content_proto_rawDescData = file_mls_message_contents_content_proto_rawDesc +) + +func file_mls_message_contents_content_proto_rawDescGZIP() []byte { + file_mls_message_contents_content_proto_rawDescOnce.Do(func() { + file_mls_message_contents_content_proto_rawDescData = protoimpl.X.CompressGZIP(file_mls_message_contents_content_proto_rawDescData) + }) + return file_mls_message_contents_content_proto_rawDescData +} + +var file_mls_message_contents_content_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_mls_message_contents_content_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_mls_message_contents_content_proto_goTypes = []interface{}{ + (Compression)(0), // 0: xmtp.mls.message_contents.Compression + (*ContentTypeId)(nil), // 1: xmtp.mls.message_contents.ContentTypeId + (*EncodedContent)(nil), // 2: xmtp.mls.message_contents.EncodedContent + nil, // 3: xmtp.mls.message_contents.EncodedContent.ParametersEntry +} +var file_mls_message_contents_content_proto_depIdxs = []int32{ + 1, // 0: xmtp.mls.message_contents.EncodedContent.type:type_name -> xmtp.mls.message_contents.ContentTypeId + 3, // 1: xmtp.mls.message_contents.EncodedContent.parameters:type_name -> xmtp.mls.message_contents.EncodedContent.ParametersEntry + 0, // 2: xmtp.mls.message_contents.EncodedContent.compression:type_name -> xmtp.mls.message_contents.Compression + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_mls_message_contents_content_proto_init() } +func file_mls_message_contents_content_proto_init() { + if File_mls_message_contents_content_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mls_message_contents_content_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContentTypeId); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_content_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EncodedContent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_mls_message_contents_content_proto_msgTypes[1].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mls_message_contents_content_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mls_message_contents_content_proto_goTypes, + DependencyIndexes: file_mls_message_contents_content_proto_depIdxs, + EnumInfos: file_mls_message_contents_content_proto_enumTypes, + MessageInfos: file_mls_message_contents_content_proto_msgTypes, + }.Build() + File_mls_message_contents_content_proto = out.File + file_mls_message_contents_content_proto_rawDesc = nil + file_mls_message_contents_content_proto_goTypes = nil + file_mls_message_contents_content_proto_depIdxs = nil +} diff --git a/pkg/proto/mls/message_contents/credential.pb.go b/pkg/proto/mls/message_contents/credential.pb.go new file mode 100644 index 00000000..937216df --- /dev/null +++ b/pkg/proto/mls/message_contents/credential.pb.go @@ -0,0 +1,309 @@ +// Credentials and revocations + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: mls/message_contents/credential.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A credential that can be used in MLS leaf nodes +type MlsCredential struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstallationPublicKey []byte `protobuf:"bytes,1,opt,name=installation_public_key,json=installationPublicKey,proto3" json:"installation_public_key,omitempty"` + // Types that are assignable to Association: + // + // *MlsCredential_Eip_191 + Association isMlsCredential_Association `protobuf_oneof:"association"` +} + +func (x *MlsCredential) Reset() { + *x = MlsCredential{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_credential_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MlsCredential) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MlsCredential) ProtoMessage() {} + +func (x *MlsCredential) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_credential_proto_msgTypes[0] + 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 MlsCredential.ProtoReflect.Descriptor instead. +func (*MlsCredential) Descriptor() ([]byte, []int) { + return file_mls_message_contents_credential_proto_rawDescGZIP(), []int{0} +} + +func (x *MlsCredential) GetInstallationPublicKey() []byte { + if x != nil { + return x.InstallationPublicKey + } + return nil +} + +func (m *MlsCredential) GetAssociation() isMlsCredential_Association { + if m != nil { + return m.Association + } + return nil +} + +func (x *MlsCredential) GetEip_191() *Eip191Association { + if x, ok := x.GetAssociation().(*MlsCredential_Eip_191); ok { + return x.Eip_191 + } + return nil +} + +type isMlsCredential_Association interface { + isMlsCredential_Association() +} + +type MlsCredential_Eip_191 struct { + Eip_191 *Eip191Association `protobuf:"bytes,2,opt,name=eip_191,json=eip191,proto3,oneof"` +} + +func (*MlsCredential_Eip_191) isMlsCredential_Association() {} + +// A declaration and proof that a credential is no longer valid +type CredentialRevocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstallationPublicKey []byte `protobuf:"bytes,1,opt,name=installation_public_key,json=installationPublicKey,proto3" json:"installation_public_key,omitempty"` + // Types that are assignable to Association: + // + // *CredentialRevocation_Eip_191 + Association isCredentialRevocation_Association `protobuf_oneof:"association"` +} + +func (x *CredentialRevocation) Reset() { + *x = CredentialRevocation{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_credential_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CredentialRevocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CredentialRevocation) ProtoMessage() {} + +func (x *CredentialRevocation) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_credential_proto_msgTypes[1] + 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 CredentialRevocation.ProtoReflect.Descriptor instead. +func (*CredentialRevocation) Descriptor() ([]byte, []int) { + return file_mls_message_contents_credential_proto_rawDescGZIP(), []int{1} +} + +func (x *CredentialRevocation) GetInstallationPublicKey() []byte { + if x != nil { + return x.InstallationPublicKey + } + return nil +} + +func (m *CredentialRevocation) GetAssociation() isCredentialRevocation_Association { + if m != nil { + return m.Association + } + return nil +} + +func (x *CredentialRevocation) GetEip_191() *Eip191Association { + if x, ok := x.GetAssociation().(*CredentialRevocation_Eip_191); ok { + return x.Eip_191 + } + return nil +} + +type isCredentialRevocation_Association interface { + isCredentialRevocation_Association() +} + +type CredentialRevocation_Eip_191 struct { + Eip_191 *Eip191Association `protobuf:"bytes,2,opt,name=eip_191,json=eip191,proto3,oneof"` +} + +func (*CredentialRevocation_Eip_191) isCredentialRevocation_Association() {} + +var File_mls_message_contents_credential_proto protoreflect.FileDescriptor + +var file_mls_message_contents_credential_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x6d, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, + 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x1a, 0x26, 0x6d, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x01, 0x0a, 0x0d, 0x4d, + 0x6c, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x17, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x15, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x12, 0x47, 0x0a, 0x07, 0x65, 0x69, 0x70, 0x5f, 0x31, 0x39, 0x31, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x45, 0x69, 0x70, 0x31, 0x39, 0x31, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x65, 0x69, 0x70, 0x31, 0x39, 0x31, 0x42, 0x0d, 0x0a, + 0x0b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x01, 0x0a, + 0x14, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x76, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x17, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x15, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x47, 0x0a, + 0x07, 0x65, 0x69, 0x70, 0x5f, 0x31, 0x39, 0x31, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x69, 0x70, 0x31, 0x39, + 0x31, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x06, + 0x65, 0x69, 0x70, 0x31, 0x39, 0x31, 0x42, 0x0d, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xef, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x0f, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, + 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x4d, 0xaa, 0x02, 0x18, + 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x18, 0x58, 0x6d, 0x74, 0x70, 0x5c, + 0x4d, 0x6c, 0x73, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x24, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x6c, 0x73, 0x5c, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1a, 0x58, 0x6d, 0x74, + 0x70, 0x3a, 0x3a, 0x4d, 0x6c, 0x73, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mls_message_contents_credential_proto_rawDescOnce sync.Once + file_mls_message_contents_credential_proto_rawDescData = file_mls_message_contents_credential_proto_rawDesc +) + +func file_mls_message_contents_credential_proto_rawDescGZIP() []byte { + file_mls_message_contents_credential_proto_rawDescOnce.Do(func() { + file_mls_message_contents_credential_proto_rawDescData = protoimpl.X.CompressGZIP(file_mls_message_contents_credential_proto_rawDescData) + }) + return file_mls_message_contents_credential_proto_rawDescData +} + +var file_mls_message_contents_credential_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_mls_message_contents_credential_proto_goTypes = []interface{}{ + (*MlsCredential)(nil), // 0: xmtp.mls.message_contents.MlsCredential + (*CredentialRevocation)(nil), // 1: xmtp.mls.message_contents.CredentialRevocation + (*Eip191Association)(nil), // 2: xmtp.mls.message_contents.Eip191Association +} +var file_mls_message_contents_credential_proto_depIdxs = []int32{ + 2, // 0: xmtp.mls.message_contents.MlsCredential.eip_191:type_name -> xmtp.mls.message_contents.Eip191Association + 2, // 1: xmtp.mls.message_contents.CredentialRevocation.eip_191:type_name -> xmtp.mls.message_contents.Eip191Association + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_mls_message_contents_credential_proto_init() } +func file_mls_message_contents_credential_proto_init() { + if File_mls_message_contents_credential_proto != nil { + return + } + file_mls_message_contents_association_proto_init() + if !protoimpl.UnsafeEnabled { + file_mls_message_contents_credential_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MlsCredential); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_credential_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CredentialRevocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_mls_message_contents_credential_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*MlsCredential_Eip_191)(nil), + } + file_mls_message_contents_credential_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*CredentialRevocation_Eip_191)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mls_message_contents_credential_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mls_message_contents_credential_proto_goTypes, + DependencyIndexes: file_mls_message_contents_credential_proto_depIdxs, + MessageInfos: file_mls_message_contents_credential_proto_msgTypes, + }.Build() + File_mls_message_contents_credential_proto = out.File + file_mls_message_contents_credential_proto_rawDesc = nil + file_mls_message_contents_credential_proto_goTypes = nil + file_mls_message_contents_credential_proto_depIdxs = nil +} diff --git a/pkg/proto/mls/message_contents/group_metadata.pb.go b/pkg/proto/mls/message_contents/group_metadata.pb.go new file mode 100644 index 00000000..7ee35a48 --- /dev/null +++ b/pkg/proto/mls/message_contents/group_metadata.pb.go @@ -0,0 +1,668 @@ +// Group metadata + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: mls/message_contents/group_metadata.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Defines the type of conversation +type ConversationType int32 + +const ( + ConversationType_CONVERSATION_TYPE_UNSPECIFIED ConversationType = 0 + ConversationType_CONVERSATION_TYPE_GROUP ConversationType = 1 + ConversationType_CONVERSATION_TYPE_DM ConversationType = 2 +) + +// Enum value maps for ConversationType. +var ( + ConversationType_name = map[int32]string{ + 0: "CONVERSATION_TYPE_UNSPECIFIED", + 1: "CONVERSATION_TYPE_GROUP", + 2: "CONVERSATION_TYPE_DM", + } + ConversationType_value = map[string]int32{ + "CONVERSATION_TYPE_UNSPECIFIED": 0, + "CONVERSATION_TYPE_GROUP": 1, + "CONVERSATION_TYPE_DM": 2, + } +) + +func (x ConversationType) Enum() *ConversationType { + p := new(ConversationType) + *p = x + return p +} + +func (x ConversationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConversationType) Descriptor() protoreflect.EnumDescriptor { + return file_mls_message_contents_group_metadata_proto_enumTypes[0].Descriptor() +} + +func (ConversationType) Type() protoreflect.EnumType { + return &file_mls_message_contents_group_metadata_proto_enumTypes[0] +} + +func (x ConversationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConversationType.Descriptor instead. +func (ConversationType) EnumDescriptor() ([]byte, []int) { + return file_mls_message_contents_group_metadata_proto_rawDescGZIP(), []int{0} +} + +// Base policy +type MembershipPolicy_BasePolicy int32 + +const ( + MembershipPolicy_BASE_POLICY_UNSPECIFIED MembershipPolicy_BasePolicy = 0 + MembershipPolicy_BASE_POLICY_ALLOW MembershipPolicy_BasePolicy = 1 + MembershipPolicy_BASE_POLICY_DENY MembershipPolicy_BasePolicy = 2 + MembershipPolicy_BASE_POLICY_ALLOW_IF_ACTOR_CREATOR MembershipPolicy_BasePolicy = 3 +) + +// Enum value maps for MembershipPolicy_BasePolicy. +var ( + MembershipPolicy_BasePolicy_name = map[int32]string{ + 0: "BASE_POLICY_UNSPECIFIED", + 1: "BASE_POLICY_ALLOW", + 2: "BASE_POLICY_DENY", + 3: "BASE_POLICY_ALLOW_IF_ACTOR_CREATOR", + } + MembershipPolicy_BasePolicy_value = map[string]int32{ + "BASE_POLICY_UNSPECIFIED": 0, + "BASE_POLICY_ALLOW": 1, + "BASE_POLICY_DENY": 2, + "BASE_POLICY_ALLOW_IF_ACTOR_CREATOR": 3, + } +) + +func (x MembershipPolicy_BasePolicy) Enum() *MembershipPolicy_BasePolicy { + p := new(MembershipPolicy_BasePolicy) + *p = x + return p +} + +func (x MembershipPolicy_BasePolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MembershipPolicy_BasePolicy) Descriptor() protoreflect.EnumDescriptor { + return file_mls_message_contents_group_metadata_proto_enumTypes[1].Descriptor() +} + +func (MembershipPolicy_BasePolicy) Type() protoreflect.EnumType { + return &file_mls_message_contents_group_metadata_proto_enumTypes[1] +} + +func (x MembershipPolicy_BasePolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MembershipPolicy_BasePolicy.Descriptor instead. +func (MembershipPolicy_BasePolicy) EnumDescriptor() ([]byte, []int) { + return file_mls_message_contents_group_metadata_proto_rawDescGZIP(), []int{2, 0} +} + +// Parent message for group metadata +type GroupMetadataV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ConversationType ConversationType `protobuf:"varint,1,opt,name=conversation_type,json=conversationType,proto3,enum=xmtp.mls.message_contents.ConversationType" json:"conversation_type,omitempty"` + CreatorAccountAddress string `protobuf:"bytes,2,opt,name=creator_account_address,json=creatorAccountAddress,proto3" json:"creator_account_address,omitempty"` + Policies *PolicySet `protobuf:"bytes,3,opt,name=policies,proto3" json:"policies,omitempty"` +} + +func (x *GroupMetadataV1) Reset() { + *x = GroupMetadataV1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupMetadataV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupMetadataV1) ProtoMessage() {} + +func (x *GroupMetadataV1) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_metadata_proto_msgTypes[0] + 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 GroupMetadataV1.ProtoReflect.Descriptor instead. +func (*GroupMetadataV1) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *GroupMetadataV1) GetConversationType() ConversationType { + if x != nil { + return x.ConversationType + } + return ConversationType_CONVERSATION_TYPE_UNSPECIFIED +} + +func (x *GroupMetadataV1) GetCreatorAccountAddress() string { + if x != nil { + return x.CreatorAccountAddress + } + return "" +} + +func (x *GroupMetadataV1) GetPolicies() *PolicySet { + if x != nil { + return x.Policies + } + return nil +} + +// The set of policies that govern the group +type PolicySet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AddMemberPolicy *MembershipPolicy `protobuf:"bytes,1,opt,name=add_member_policy,json=addMemberPolicy,proto3" json:"add_member_policy,omitempty"` + RemoveMemberPolicy *MembershipPolicy `protobuf:"bytes,2,opt,name=remove_member_policy,json=removeMemberPolicy,proto3" json:"remove_member_policy,omitempty"` +} + +func (x *PolicySet) Reset() { + *x = PolicySet{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PolicySet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PolicySet) ProtoMessage() {} + +func (x *PolicySet) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_metadata_proto_msgTypes[1] + 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 PolicySet.ProtoReflect.Descriptor instead. +func (*PolicySet) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_metadata_proto_rawDescGZIP(), []int{1} +} + +func (x *PolicySet) GetAddMemberPolicy() *MembershipPolicy { + if x != nil { + return x.AddMemberPolicy + } + return nil +} + +func (x *PolicySet) GetRemoveMemberPolicy() *MembershipPolicy { + if x != nil { + return x.RemoveMemberPolicy + } + return nil +} + +// A policy that governs adding/removing members or installations +type MembershipPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Kind: + // + // *MembershipPolicy_Base + // *MembershipPolicy_AndCondition_ + // *MembershipPolicy_AnyCondition_ + Kind isMembershipPolicy_Kind `protobuf_oneof:"kind"` +} + +func (x *MembershipPolicy) Reset() { + *x = MembershipPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_metadata_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MembershipPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MembershipPolicy) ProtoMessage() {} + +func (x *MembershipPolicy) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_metadata_proto_msgTypes[2] + 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 MembershipPolicy.ProtoReflect.Descriptor instead. +func (*MembershipPolicy) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_metadata_proto_rawDescGZIP(), []int{2} +} + +func (m *MembershipPolicy) GetKind() isMembershipPolicy_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (x *MembershipPolicy) GetBase() MembershipPolicy_BasePolicy { + if x, ok := x.GetKind().(*MembershipPolicy_Base); ok { + return x.Base + } + return MembershipPolicy_BASE_POLICY_UNSPECIFIED +} + +func (x *MembershipPolicy) GetAndCondition() *MembershipPolicy_AndCondition { + if x, ok := x.GetKind().(*MembershipPolicy_AndCondition_); ok { + return x.AndCondition + } + return nil +} + +func (x *MembershipPolicy) GetAnyCondition() *MembershipPolicy_AnyCondition { + if x, ok := x.GetKind().(*MembershipPolicy_AnyCondition_); ok { + return x.AnyCondition + } + return nil +} + +type isMembershipPolicy_Kind interface { + isMembershipPolicy_Kind() +} + +type MembershipPolicy_Base struct { + Base MembershipPolicy_BasePolicy `protobuf:"varint,1,opt,name=base,proto3,enum=xmtp.mls.message_contents.MembershipPolicy_BasePolicy,oneof"` +} + +type MembershipPolicy_AndCondition_ struct { + AndCondition *MembershipPolicy_AndCondition `protobuf:"bytes,2,opt,name=and_condition,json=andCondition,proto3,oneof"` +} + +type MembershipPolicy_AnyCondition_ struct { + AnyCondition *MembershipPolicy_AnyCondition `protobuf:"bytes,3,opt,name=any_condition,json=anyCondition,proto3,oneof"` +} + +func (*MembershipPolicy_Base) isMembershipPolicy_Kind() {} + +func (*MembershipPolicy_AndCondition_) isMembershipPolicy_Kind() {} + +func (*MembershipPolicy_AnyCondition_) isMembershipPolicy_Kind() {} + +// Combine multiple policies. All must evaluate to true +type MembershipPolicy_AndCondition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Policies []*MembershipPolicy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` +} + +func (x *MembershipPolicy_AndCondition) Reset() { + *x = MembershipPolicy_AndCondition{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_metadata_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MembershipPolicy_AndCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MembershipPolicy_AndCondition) ProtoMessage() {} + +func (x *MembershipPolicy_AndCondition) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_metadata_proto_msgTypes[3] + 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 MembershipPolicy_AndCondition.ProtoReflect.Descriptor instead. +func (*MembershipPolicy_AndCondition) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_metadata_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *MembershipPolicy_AndCondition) GetPolicies() []*MembershipPolicy { + if x != nil { + return x.Policies + } + return nil +} + +// Combine multiple policies. Any must evaluate to true +type MembershipPolicy_AnyCondition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Policies []*MembershipPolicy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` +} + +func (x *MembershipPolicy_AnyCondition) Reset() { + *x = MembershipPolicy_AnyCondition{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_metadata_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MembershipPolicy_AnyCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MembershipPolicy_AnyCondition) ProtoMessage() {} + +func (x *MembershipPolicy_AnyCondition) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_metadata_proto_msgTypes[4] + 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 MembershipPolicy_AnyCondition.ProtoReflect.Descriptor instead. +func (*MembershipPolicy_AnyCondition) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_metadata_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *MembershipPolicy_AnyCondition) GetPolicies() []*MembershipPolicy { + if x != nil { + return x.Policies + } + return nil +} + +var File_mls_message_contents_group_metadata_proto protoreflect.FileDescriptor + +var file_mls_message_contents_group_metadata_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6d, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x56, 0x31, 0x12, 0x58, 0x0a, 0x11, 0x63, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, + 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, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x08, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x53, 0x65, 0x74, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0xc3, + 0x01, 0x0a, 0x09, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, 0x74, 0x12, 0x57, 0x0a, 0x11, + 0x61, 0x64, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, + 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5d, 0x0a, 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x12, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x22, 0xdc, 0x04, 0x0a, 0x10, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x68, 0x69, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4c, 0x0a, 0x04, 0x62, 0x61, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, + 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, + 0x00, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0d, 0x61, 0x6e, 0x64, 0x5f, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x68, 0x69, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x41, 0x6e, 0x64, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x6e, 0x64, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0d, 0x61, 0x6e, 0x79, 0x5f, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x38, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x41, 0x6e, 0x79, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x6e, 0x79, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x57, 0x0a, 0x0c, 0x41, 0x6e, 0x64, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x08, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x1a, 0x57, 0x0a, 0x0c, 0x41, 0x6e, 0x79, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0x7e, 0x0a, 0x0a, 0x42, + 0x61, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x41, 0x53, + 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x50, + 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x14, 0x0a, + 0x10, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x44, 0x45, 0x4e, + 0x59, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, + 0x43, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x43, 0x54, 0x4f, + 0x52, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x03, 0x42, 0x06, 0x0a, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x2a, 0x6c, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, 0x4e, 0x56, 0x45, + 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, + 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4f, 0x4e, 0x56, 0x45, + 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4d, 0x10, + 0x02, 0x42, 0xf2, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, + 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x42, 0x12, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, + 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x4d, 0xaa, 0x02, 0x18, 0x58, + 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x18, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, + 0x6c, 0x73, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0xe2, 0x02, 0x24, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x6c, 0x73, 0x5c, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1a, 0x58, 0x6d, 0x74, 0x70, + 0x3a, 0x3a, 0x4d, 0x6c, 0x73, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mls_message_contents_group_metadata_proto_rawDescOnce sync.Once + file_mls_message_contents_group_metadata_proto_rawDescData = file_mls_message_contents_group_metadata_proto_rawDesc +) + +func file_mls_message_contents_group_metadata_proto_rawDescGZIP() []byte { + file_mls_message_contents_group_metadata_proto_rawDescOnce.Do(func() { + file_mls_message_contents_group_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_mls_message_contents_group_metadata_proto_rawDescData) + }) + return file_mls_message_contents_group_metadata_proto_rawDescData +} + +var file_mls_message_contents_group_metadata_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_mls_message_contents_group_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_mls_message_contents_group_metadata_proto_goTypes = []interface{}{ + (ConversationType)(0), // 0: xmtp.mls.message_contents.ConversationType + (MembershipPolicy_BasePolicy)(0), // 1: xmtp.mls.message_contents.MembershipPolicy.BasePolicy + (*GroupMetadataV1)(nil), // 2: xmtp.mls.message_contents.GroupMetadataV1 + (*PolicySet)(nil), // 3: xmtp.mls.message_contents.PolicySet + (*MembershipPolicy)(nil), // 4: xmtp.mls.message_contents.MembershipPolicy + (*MembershipPolicy_AndCondition)(nil), // 5: xmtp.mls.message_contents.MembershipPolicy.AndCondition + (*MembershipPolicy_AnyCondition)(nil), // 6: xmtp.mls.message_contents.MembershipPolicy.AnyCondition +} +var file_mls_message_contents_group_metadata_proto_depIdxs = []int32{ + 0, // 0: xmtp.mls.message_contents.GroupMetadataV1.conversation_type:type_name -> xmtp.mls.message_contents.ConversationType + 3, // 1: xmtp.mls.message_contents.GroupMetadataV1.policies:type_name -> xmtp.mls.message_contents.PolicySet + 4, // 2: xmtp.mls.message_contents.PolicySet.add_member_policy:type_name -> xmtp.mls.message_contents.MembershipPolicy + 4, // 3: xmtp.mls.message_contents.PolicySet.remove_member_policy:type_name -> xmtp.mls.message_contents.MembershipPolicy + 1, // 4: xmtp.mls.message_contents.MembershipPolicy.base:type_name -> xmtp.mls.message_contents.MembershipPolicy.BasePolicy + 5, // 5: xmtp.mls.message_contents.MembershipPolicy.and_condition:type_name -> xmtp.mls.message_contents.MembershipPolicy.AndCondition + 6, // 6: xmtp.mls.message_contents.MembershipPolicy.any_condition:type_name -> xmtp.mls.message_contents.MembershipPolicy.AnyCondition + 4, // 7: xmtp.mls.message_contents.MembershipPolicy.AndCondition.policies:type_name -> xmtp.mls.message_contents.MembershipPolicy + 4, // 8: xmtp.mls.message_contents.MembershipPolicy.AnyCondition.policies:type_name -> xmtp.mls.message_contents.MembershipPolicy + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_mls_message_contents_group_metadata_proto_init() } +func file_mls_message_contents_group_metadata_proto_init() { + if File_mls_message_contents_group_metadata_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mls_message_contents_group_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupMetadataV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_group_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PolicySet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_group_metadata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MembershipPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_group_metadata_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MembershipPolicy_AndCondition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_group_metadata_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MembershipPolicy_AnyCondition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_mls_message_contents_group_metadata_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*MembershipPolicy_Base)(nil), + (*MembershipPolicy_AndCondition_)(nil), + (*MembershipPolicy_AnyCondition_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mls_message_contents_group_metadata_proto_rawDesc, + NumEnums: 2, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mls_message_contents_group_metadata_proto_goTypes, + DependencyIndexes: file_mls_message_contents_group_metadata_proto_depIdxs, + EnumInfos: file_mls_message_contents_group_metadata_proto_enumTypes, + MessageInfos: file_mls_message_contents_group_metadata_proto_msgTypes, + }.Build() + File_mls_message_contents_group_metadata_proto = out.File + file_mls_message_contents_group_metadata_proto_rawDesc = nil + file_mls_message_contents_group_metadata_proto_goTypes = nil + file_mls_message_contents_group_metadata_proto_depIdxs = nil +} diff --git a/pkg/proto/mls/message_contents/transcript_messages.pb.go b/pkg/proto/mls/message_contents/transcript_messages.pb.go new file mode 100644 index 00000000..2b04be13 --- /dev/null +++ b/pkg/proto/mls/message_contents/transcript_messages.pb.go @@ -0,0 +1,304 @@ +// Message content encoding structures + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: mls/message_contents/transcript_messages.proto + +package message_contents + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A group member and affected installation IDs +type MembershipChange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InstallationIds [][]byte `protobuf:"bytes,1,rep,name=installation_ids,json=installationIds,proto3" json:"installation_ids,omitempty"` + AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + InitiatedByAccountAddress string `protobuf:"bytes,3,opt,name=initiated_by_account_address,json=initiatedByAccountAddress,proto3" json:"initiated_by_account_address,omitempty"` +} + +func (x *MembershipChange) Reset() { + *x = MembershipChange{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_transcript_messages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MembershipChange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MembershipChange) ProtoMessage() {} + +func (x *MembershipChange) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_transcript_messages_proto_msgTypes[0] + 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 MembershipChange.ProtoReflect.Descriptor instead. +func (*MembershipChange) Descriptor() ([]byte, []int) { + return file_mls_message_contents_transcript_messages_proto_rawDescGZIP(), []int{0} +} + +func (x *MembershipChange) GetInstallationIds() [][]byte { + if x != nil { + return x.InstallationIds + } + return nil +} + +func (x *MembershipChange) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +func (x *MembershipChange) GetInitiatedByAccountAddress() string { + if x != nil { + return x.InitiatedByAccountAddress + } + return "" +} + +// The group membership change proto +type GroupMembershipChanges struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Members that have been added in the commit + MembersAdded []*MembershipChange `protobuf:"bytes,1,rep,name=members_added,json=membersAdded,proto3" json:"members_added,omitempty"` + // Members that have been removed in the commit + MembersRemoved []*MembershipChange `protobuf:"bytes,2,rep,name=members_removed,json=membersRemoved,proto3" json:"members_removed,omitempty"` + // Installations that have been added in the commit, grouped by member + InstallationsAdded []*MembershipChange `protobuf:"bytes,3,rep,name=installations_added,json=installationsAdded,proto3" json:"installations_added,omitempty"` + // Installations removed in the commit, grouped by member + InstallationsRemoved []*MembershipChange `protobuf:"bytes,4,rep,name=installations_removed,json=installationsRemoved,proto3" json:"installations_removed,omitempty"` +} + +func (x *GroupMembershipChanges) Reset() { + *x = GroupMembershipChanges{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_transcript_messages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupMembershipChanges) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupMembershipChanges) ProtoMessage() {} + +func (x *GroupMembershipChanges) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_transcript_messages_proto_msgTypes[1] + 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 GroupMembershipChanges.ProtoReflect.Descriptor instead. +func (*GroupMembershipChanges) Descriptor() ([]byte, []int) { + return file_mls_message_contents_transcript_messages_proto_rawDescGZIP(), []int{1} +} + +func (x *GroupMembershipChanges) GetMembersAdded() []*MembershipChange { + if x != nil { + return x.MembersAdded + } + return nil +} + +func (x *GroupMembershipChanges) GetMembersRemoved() []*MembershipChange { + if x != nil { + return x.MembersRemoved + } + return nil +} + +func (x *GroupMembershipChanges) GetInstallationsAdded() []*MembershipChange { + if x != nil { + return x.InstallationsAdded + } + return nil +} + +func (x *GroupMembershipChanges) GetInstallationsRemoved() []*MembershipChange { + if x != nil { + return x.InstallationsRemoved + } + return nil +} + +var File_mls_message_contents_transcript_messages_proto protoreflect.FileDescriptor + +var file_mls_message_contents_transcript_messages_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x6d, 0x6c, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x19, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x10, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x12, 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0f, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x3f, 0x0a, 0x1c, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x80, 0x03, 0x0a, 0x16, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x12, 0x50, 0x0a, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, + 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x41, 0x64, 0x64, + 0x65, 0x64, 0x12, 0x54, 0x0a, 0x0f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x5c, 0x0a, 0x13, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x60, 0x0a, 0x15, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x52, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x42, 0xf7, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x17, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, + 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x6c, + 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x4d, 0xaa, 0x02, 0x18, 0x58, 0x6d, 0x74, 0x70, 0x2e, + 0x4d, 0x6c, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x73, 0xca, 0x02, 0x18, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x6c, 0x73, 0x5c, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0xe2, 0x02, + 0x24, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x6c, 0x73, 0x5c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1a, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x6c, + 0x73, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mls_message_contents_transcript_messages_proto_rawDescOnce sync.Once + file_mls_message_contents_transcript_messages_proto_rawDescData = file_mls_message_contents_transcript_messages_proto_rawDesc +) + +func file_mls_message_contents_transcript_messages_proto_rawDescGZIP() []byte { + file_mls_message_contents_transcript_messages_proto_rawDescOnce.Do(func() { + file_mls_message_contents_transcript_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_mls_message_contents_transcript_messages_proto_rawDescData) + }) + return file_mls_message_contents_transcript_messages_proto_rawDescData +} + +var file_mls_message_contents_transcript_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_mls_message_contents_transcript_messages_proto_goTypes = []interface{}{ + (*MembershipChange)(nil), // 0: xmtp.mls.message_contents.MembershipChange + (*GroupMembershipChanges)(nil), // 1: xmtp.mls.message_contents.GroupMembershipChanges +} +var file_mls_message_contents_transcript_messages_proto_depIdxs = []int32{ + 0, // 0: xmtp.mls.message_contents.GroupMembershipChanges.members_added:type_name -> xmtp.mls.message_contents.MembershipChange + 0, // 1: xmtp.mls.message_contents.GroupMembershipChanges.members_removed:type_name -> xmtp.mls.message_contents.MembershipChange + 0, // 2: xmtp.mls.message_contents.GroupMembershipChanges.installations_added:type_name -> xmtp.mls.message_contents.MembershipChange + 0, // 3: xmtp.mls.message_contents.GroupMembershipChanges.installations_removed:type_name -> xmtp.mls.message_contents.MembershipChange + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_mls_message_contents_transcript_messages_proto_init() } +func file_mls_message_contents_transcript_messages_proto_init() { + if File_mls_message_contents_transcript_messages_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mls_message_contents_transcript_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MembershipChange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_transcript_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupMembershipChanges); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mls_message_contents_transcript_messages_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mls_message_contents_transcript_messages_proto_goTypes, + DependencyIndexes: file_mls_message_contents_transcript_messages_proto_depIdxs, + MessageInfos: file_mls_message_contents_transcript_messages_proto_msgTypes, + }.Build() + File_mls_message_contents_transcript_messages_proto = out.File + file_mls_message_contents_transcript_messages_proto_rawDesc = nil + file_mls_message_contents_transcript_messages_proto_goTypes = nil + file_mls_message_contents_transcript_messages_proto_depIdxs = nil +} diff --git a/pkg/proto/mls_validation/v1/service.pb.go b/pkg/proto/mls_validation/v1/service.pb.go new file mode 100644 index 00000000..09f67501 --- /dev/null +++ b/pkg/proto/mls_validation/v1/service.pb.go @@ -0,0 +1,735 @@ +// Message API + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc (unknown) +// source: mls_validation/v1/service.proto + +package mls_validationv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Contains a batch of serialized Key Packages +type ValidateKeyPackagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyPackages []*ValidateKeyPackagesRequest_KeyPackage `protobuf:"bytes,1,rep,name=key_packages,json=keyPackages,proto3" json:"key_packages,omitempty"` +} + +func (x *ValidateKeyPackagesRequest) Reset() { + *x = ValidateKeyPackagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateKeyPackagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateKeyPackagesRequest) ProtoMessage() {} + +func (x *ValidateKeyPackagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_validation_v1_service_proto_msgTypes[0] + 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 ValidateKeyPackagesRequest.ProtoReflect.Descriptor instead. +func (*ValidateKeyPackagesRequest) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{0} +} + +func (x *ValidateKeyPackagesRequest) GetKeyPackages() []*ValidateKeyPackagesRequest_KeyPackage { + if x != nil { + return x.KeyPackages + } + return nil +} + +// Response to ValidateKeyPackagesRequest +type ValidateKeyPackagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*ValidateKeyPackagesResponse_ValidationResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *ValidateKeyPackagesResponse) Reset() { + *x = ValidateKeyPackagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateKeyPackagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateKeyPackagesResponse) ProtoMessage() {} + +func (x *ValidateKeyPackagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_mls_validation_v1_service_proto_msgTypes[1] + 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 ValidateKeyPackagesResponse.ProtoReflect.Descriptor instead. +func (*ValidateKeyPackagesResponse) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ValidateKeyPackagesResponse) GetResponses() []*ValidateKeyPackagesResponse_ValidationResponse { + if x != nil { + return x.Responses + } + return nil +} + +// Contains a batch of serialized Group Messages +type ValidateGroupMessagesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupMessages []*ValidateGroupMessagesRequest_GroupMessage `protobuf:"bytes,1,rep,name=group_messages,json=groupMessages,proto3" json:"group_messages,omitempty"` +} + +func (x *ValidateGroupMessagesRequest) Reset() { + *x = ValidateGroupMessagesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateGroupMessagesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateGroupMessagesRequest) ProtoMessage() {} + +func (x *ValidateGroupMessagesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_validation_v1_service_proto_msgTypes[2] + 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 ValidateGroupMessagesRequest.ProtoReflect.Descriptor instead. +func (*ValidateGroupMessagesRequest) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ValidateGroupMessagesRequest) GetGroupMessages() []*ValidateGroupMessagesRequest_GroupMessage { + if x != nil { + return x.GroupMessages + } + return nil +} + +// Response to ValidateGroupMessagesRequest +type ValidateGroupMessagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*ValidateGroupMessagesResponse_ValidationResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *ValidateGroupMessagesResponse) Reset() { + *x = ValidateGroupMessagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateGroupMessagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateGroupMessagesResponse) ProtoMessage() {} + +func (x *ValidateGroupMessagesResponse) ProtoReflect() protoreflect.Message { + mi := &file_mls_validation_v1_service_proto_msgTypes[3] + 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 ValidateGroupMessagesResponse.ProtoReflect.Descriptor instead. +func (*ValidateGroupMessagesResponse) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ValidateGroupMessagesResponse) GetResponses() []*ValidateGroupMessagesResponse_ValidationResponse { + if x != nil { + return x.Responses + } + return nil +} + +// Wrapper for each key package +type ValidateKeyPackagesRequest_KeyPackage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyPackageBytesTlsSerialized []byte `protobuf:"bytes,1,opt,name=key_package_bytes_tls_serialized,json=keyPackageBytesTlsSerialized,proto3" json:"key_package_bytes_tls_serialized,omitempty"` +} + +func (x *ValidateKeyPackagesRequest_KeyPackage) Reset() { + *x = ValidateKeyPackagesRequest_KeyPackage{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateKeyPackagesRequest_KeyPackage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateKeyPackagesRequest_KeyPackage) ProtoMessage() {} + +func (x *ValidateKeyPackagesRequest_KeyPackage) ProtoReflect() protoreflect.Message { + mi := &file_mls_validation_v1_service_proto_msgTypes[4] + 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 ValidateKeyPackagesRequest_KeyPackage.ProtoReflect.Descriptor instead. +func (*ValidateKeyPackagesRequest_KeyPackage) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ValidateKeyPackagesRequest_KeyPackage) GetKeyPackageBytesTlsSerialized() []byte { + if x != nil { + return x.KeyPackageBytesTlsSerialized + } + return nil +} + +// An individual response to one key package +type ValidateKeyPackagesResponse_ValidationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsOk bool `protobuf:"varint,1,opt,name=is_ok,json=isOk,proto3" json:"is_ok,omitempty"` + ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + InstallationId []byte `protobuf:"bytes,3,opt,name=installation_id,json=installationId,proto3" json:"installation_id,omitempty"` + AccountAddress string `protobuf:"bytes,4,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + CredentialIdentityBytes []byte `protobuf:"bytes,5,opt,name=credential_identity_bytes,json=credentialIdentityBytes,proto3" json:"credential_identity_bytes,omitempty"` + Expiration uint64 `protobuf:"varint,6,opt,name=expiration,proto3" json:"expiration,omitempty"` +} + +func (x *ValidateKeyPackagesResponse_ValidationResponse) Reset() { + *x = ValidateKeyPackagesResponse_ValidationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateKeyPackagesResponse_ValidationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateKeyPackagesResponse_ValidationResponse) ProtoMessage() {} + +func (x *ValidateKeyPackagesResponse_ValidationResponse) ProtoReflect() protoreflect.Message { + mi := &file_mls_validation_v1_service_proto_msgTypes[5] + 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 ValidateKeyPackagesResponse_ValidationResponse.ProtoReflect.Descriptor instead. +func (*ValidateKeyPackagesResponse_ValidationResponse) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *ValidateKeyPackagesResponse_ValidationResponse) GetIsOk() bool { + if x != nil { + return x.IsOk + } + return false +} + +func (x *ValidateKeyPackagesResponse_ValidationResponse) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *ValidateKeyPackagesResponse_ValidationResponse) GetInstallationId() []byte { + if x != nil { + return x.InstallationId + } + return nil +} + +func (x *ValidateKeyPackagesResponse_ValidationResponse) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +func (x *ValidateKeyPackagesResponse_ValidationResponse) GetCredentialIdentityBytes() []byte { + if x != nil { + return x.CredentialIdentityBytes + } + return nil +} + +func (x *ValidateKeyPackagesResponse_ValidationResponse) GetExpiration() uint64 { + if x != nil { + return x.Expiration + } + return 0 +} + +// Wrapper for each message +type ValidateGroupMessagesRequest_GroupMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupMessageBytesTlsSerialized []byte `protobuf:"bytes,1,opt,name=group_message_bytes_tls_serialized,json=groupMessageBytesTlsSerialized,proto3" json:"group_message_bytes_tls_serialized,omitempty"` +} + +func (x *ValidateGroupMessagesRequest_GroupMessage) Reset() { + *x = ValidateGroupMessagesRequest_GroupMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateGroupMessagesRequest_GroupMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateGroupMessagesRequest_GroupMessage) ProtoMessage() {} + +func (x *ValidateGroupMessagesRequest_GroupMessage) ProtoReflect() protoreflect.Message { + mi := &file_mls_validation_v1_service_proto_msgTypes[6] + 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 ValidateGroupMessagesRequest_GroupMessage.ProtoReflect.Descriptor instead. +func (*ValidateGroupMessagesRequest_GroupMessage) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *ValidateGroupMessagesRequest_GroupMessage) GetGroupMessageBytesTlsSerialized() []byte { + if x != nil { + return x.GroupMessageBytesTlsSerialized + } + return nil +} + +// An individual response to one message +type ValidateGroupMessagesResponse_ValidationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsOk bool `protobuf:"varint,1,opt,name=is_ok,json=isOk,proto3" json:"is_ok,omitempty"` + ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + GroupId string `protobuf:"bytes,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` +} + +func (x *ValidateGroupMessagesResponse_ValidationResponse) Reset() { + *x = ValidateGroupMessagesResponse_ValidationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateGroupMessagesResponse_ValidationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateGroupMessagesResponse_ValidationResponse) ProtoMessage() {} + +func (x *ValidateGroupMessagesResponse_ValidationResponse) ProtoReflect() protoreflect.Message { + mi := &file_mls_validation_v1_service_proto_msgTypes[7] + 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 ValidateGroupMessagesResponse_ValidationResponse.ProtoReflect.Descriptor instead. +func (*ValidateGroupMessagesResponse_ValidationResponse) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *ValidateGroupMessagesResponse_ValidationResponse) GetIsOk() bool { + if x != nil { + return x.IsOk + } + return false +} + +func (x *ValidateGroupMessagesResponse_ValidationResponse) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *ValidateGroupMessagesResponse_ValidationResponse) GetGroupId() string { + if x != nil { + return x.GroupId + } + return "" +} + +var File_mls_validation_v1_service_proto protoreflect.FileDescriptor + +var file_mls_validation_v1_service_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6d, 0x6c, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x16, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0xd4, 0x01, 0x0a, 0x1a, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x60, 0x0a, 0x0c, 0x6b, 0x65, 0x79, 0x5f, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x6b, + 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x54, 0x0a, 0x0a, 0x4b, 0x65, + 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x46, 0x0a, 0x20, 0x6b, 0x65, 0x79, 0x5f, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x6c, + 0x73, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x1c, 0x6b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x54, 0x6c, 0x73, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x22, 0x82, 0x03, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x64, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x1a, 0xfc, 0x01, 0x0a, 0x12, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x13, 0x0a, + 0x05, 0x69, 0x73, 0x5f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, + 0x4f, 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x63, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x17, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xe4, 0x01, 0x0a, 0x1c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x68, 0x0a, 0x0e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x1a, 0x5a, 0x0a, 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x4a, 0x0a, 0x22, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x1e, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x54, + 0x6c, 0x73, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x22, 0xf2, 0x01, 0x0a, + 0x1d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, + 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x48, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x5f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x1a, 0x69, 0x0a, 0x12, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x13, 0x0a, 0x05, + 0x69, 0x73, 0x5f, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, + 0x6b, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, + 0x64, 0x32, 0x9b, 0x02, 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x70, 0x69, 0x12, 0x80, 0x01, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x32, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x33, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x86, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x12, 0x34, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, + 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, + 0xeb, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, + 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0c, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x6c, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6c, 0x73, 0x5f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x58, 0x4d, 0x58, 0xaa, + 0x02, 0x15, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x4d, 0x6c, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, + 0x6c, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x21, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x4d, 0x6c, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x4d, 0x6c, 0x73, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mls_validation_v1_service_proto_rawDescOnce sync.Once + file_mls_validation_v1_service_proto_rawDescData = file_mls_validation_v1_service_proto_rawDesc +) + +func file_mls_validation_v1_service_proto_rawDescGZIP() []byte { + file_mls_validation_v1_service_proto_rawDescOnce.Do(func() { + file_mls_validation_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_mls_validation_v1_service_proto_rawDescData) + }) + return file_mls_validation_v1_service_proto_rawDescData +} + +var file_mls_validation_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_mls_validation_v1_service_proto_goTypes = []interface{}{ + (*ValidateKeyPackagesRequest)(nil), // 0: xmtp.mls_validation.v1.ValidateKeyPackagesRequest + (*ValidateKeyPackagesResponse)(nil), // 1: xmtp.mls_validation.v1.ValidateKeyPackagesResponse + (*ValidateGroupMessagesRequest)(nil), // 2: xmtp.mls_validation.v1.ValidateGroupMessagesRequest + (*ValidateGroupMessagesResponse)(nil), // 3: xmtp.mls_validation.v1.ValidateGroupMessagesResponse + (*ValidateKeyPackagesRequest_KeyPackage)(nil), // 4: xmtp.mls_validation.v1.ValidateKeyPackagesRequest.KeyPackage + (*ValidateKeyPackagesResponse_ValidationResponse)(nil), // 5: xmtp.mls_validation.v1.ValidateKeyPackagesResponse.ValidationResponse + (*ValidateGroupMessagesRequest_GroupMessage)(nil), // 6: xmtp.mls_validation.v1.ValidateGroupMessagesRequest.GroupMessage + (*ValidateGroupMessagesResponse_ValidationResponse)(nil), // 7: xmtp.mls_validation.v1.ValidateGroupMessagesResponse.ValidationResponse +} +var file_mls_validation_v1_service_proto_depIdxs = []int32{ + 4, // 0: xmtp.mls_validation.v1.ValidateKeyPackagesRequest.key_packages:type_name -> xmtp.mls_validation.v1.ValidateKeyPackagesRequest.KeyPackage + 5, // 1: xmtp.mls_validation.v1.ValidateKeyPackagesResponse.responses:type_name -> xmtp.mls_validation.v1.ValidateKeyPackagesResponse.ValidationResponse + 6, // 2: xmtp.mls_validation.v1.ValidateGroupMessagesRequest.group_messages:type_name -> xmtp.mls_validation.v1.ValidateGroupMessagesRequest.GroupMessage + 7, // 3: xmtp.mls_validation.v1.ValidateGroupMessagesResponse.responses:type_name -> xmtp.mls_validation.v1.ValidateGroupMessagesResponse.ValidationResponse + 0, // 4: xmtp.mls_validation.v1.ValidationApi.ValidateKeyPackages:input_type -> xmtp.mls_validation.v1.ValidateKeyPackagesRequest + 2, // 5: xmtp.mls_validation.v1.ValidationApi.ValidateGroupMessages:input_type -> xmtp.mls_validation.v1.ValidateGroupMessagesRequest + 1, // 6: xmtp.mls_validation.v1.ValidationApi.ValidateKeyPackages:output_type -> xmtp.mls_validation.v1.ValidateKeyPackagesResponse + 3, // 7: xmtp.mls_validation.v1.ValidationApi.ValidateGroupMessages:output_type -> xmtp.mls_validation.v1.ValidateGroupMessagesResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_mls_validation_v1_service_proto_init() } +func file_mls_validation_v1_service_proto_init() { + if File_mls_validation_v1_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mls_validation_v1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateKeyPackagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_validation_v1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateKeyPackagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_validation_v1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateGroupMessagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_validation_v1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateGroupMessagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_validation_v1_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateKeyPackagesRequest_KeyPackage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_validation_v1_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateKeyPackagesResponse_ValidationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_validation_v1_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateGroupMessagesRequest_GroupMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_validation_v1_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateGroupMessagesResponse_ValidationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mls_validation_v1_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_mls_validation_v1_service_proto_goTypes, + DependencyIndexes: file_mls_validation_v1_service_proto_depIdxs, + MessageInfos: file_mls_validation_v1_service_proto_msgTypes, + }.Build() + File_mls_validation_v1_service_proto = out.File + file_mls_validation_v1_service_proto_rawDesc = nil + file_mls_validation_v1_service_proto_goTypes = nil + file_mls_validation_v1_service_proto_depIdxs = nil +} diff --git a/pkg/proto/mls_validation/v1/service_grpc.pb.go b/pkg/proto/mls_validation/v1/service_grpc.pb.go new file mode 100644 index 00000000..a0e21c24 --- /dev/null +++ b/pkg/proto/mls_validation/v1/service_grpc.pb.go @@ -0,0 +1,152 @@ +// Message API + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: mls_validation/v1/service.proto + +package mls_validationv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ValidationApi_ValidateKeyPackages_FullMethodName = "/xmtp.mls_validation.v1.ValidationApi/ValidateKeyPackages" + ValidationApi_ValidateGroupMessages_FullMethodName = "/xmtp.mls_validation.v1.ValidationApi/ValidateGroupMessages" +) + +// ValidationApiClient is the client API for ValidationApi service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ValidationApiClient interface { + // Validates and parses a batch of key packages and returns relevant details + ValidateKeyPackages(ctx context.Context, in *ValidateKeyPackagesRequest, opts ...grpc.CallOption) (*ValidateKeyPackagesResponse, error) + // Validates and parses a group message and returns relevant details + ValidateGroupMessages(ctx context.Context, in *ValidateGroupMessagesRequest, opts ...grpc.CallOption) (*ValidateGroupMessagesResponse, error) +} + +type validationApiClient struct { + cc grpc.ClientConnInterface +} + +func NewValidationApiClient(cc grpc.ClientConnInterface) ValidationApiClient { + return &validationApiClient{cc} +} + +func (c *validationApiClient) ValidateKeyPackages(ctx context.Context, in *ValidateKeyPackagesRequest, opts ...grpc.CallOption) (*ValidateKeyPackagesResponse, error) { + out := new(ValidateKeyPackagesResponse) + err := c.cc.Invoke(ctx, ValidationApi_ValidateKeyPackages_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *validationApiClient) ValidateGroupMessages(ctx context.Context, in *ValidateGroupMessagesRequest, opts ...grpc.CallOption) (*ValidateGroupMessagesResponse, error) { + out := new(ValidateGroupMessagesResponse) + err := c.cc.Invoke(ctx, ValidationApi_ValidateGroupMessages_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ValidationApiServer is the server API for ValidationApi service. +// All implementations must embed UnimplementedValidationApiServer +// for forward compatibility +type ValidationApiServer interface { + // Validates and parses a batch of key packages and returns relevant details + ValidateKeyPackages(context.Context, *ValidateKeyPackagesRequest) (*ValidateKeyPackagesResponse, error) + // Validates and parses a group message and returns relevant details + ValidateGroupMessages(context.Context, *ValidateGroupMessagesRequest) (*ValidateGroupMessagesResponse, error) + mustEmbedUnimplementedValidationApiServer() +} + +// UnimplementedValidationApiServer must be embedded to have forward compatible implementations. +type UnimplementedValidationApiServer struct { +} + +func (UnimplementedValidationApiServer) ValidateKeyPackages(context.Context, *ValidateKeyPackagesRequest) (*ValidateKeyPackagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateKeyPackages not implemented") +} +func (UnimplementedValidationApiServer) ValidateGroupMessages(context.Context, *ValidateGroupMessagesRequest) (*ValidateGroupMessagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateGroupMessages not implemented") +} +func (UnimplementedValidationApiServer) mustEmbedUnimplementedValidationApiServer() {} + +// UnsafeValidationApiServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ValidationApiServer will +// result in compilation errors. +type UnsafeValidationApiServer interface { + mustEmbedUnimplementedValidationApiServer() +} + +func RegisterValidationApiServer(s grpc.ServiceRegistrar, srv ValidationApiServer) { + s.RegisterService(&ValidationApi_ServiceDesc, srv) +} + +func _ValidationApi_ValidateKeyPackages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateKeyPackagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ValidationApiServer).ValidateKeyPackages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ValidationApi_ValidateKeyPackages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ValidationApiServer).ValidateKeyPackages(ctx, req.(*ValidateKeyPackagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ValidationApi_ValidateGroupMessages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateGroupMessagesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ValidationApiServer).ValidateGroupMessages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ValidationApi_ValidateGroupMessages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ValidationApiServer).ValidateGroupMessages(ctx, req.(*ValidateGroupMessagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ValidationApi_ServiceDesc is the grpc.ServiceDesc for ValidationApi service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ValidationApi_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "xmtp.mls_validation.v1.ValidationApi", + HandlerType: (*ValidationApiServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ValidateKeyPackages", + Handler: _ValidationApi_ValidateKeyPackages_Handler, + }, + { + MethodName: "ValidateGroupMessages", + Handler: _ValidationApi_ValidateGroupMessages_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mls_validation/v1/service.proto", +} diff --git a/pkg/proto/openapi/keystore_api/v1/keystore.swagger.json b/pkg/proto/openapi/keystore_api/v1/keystore.swagger.json new file mode 100644 index 00000000..a1d03007 --- /dev/null +++ b/pkg/proto/openapi/keystore_api/v1/keystore.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "keystore_api/v1/keystore.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_api/v1/authn.swagger.json b/pkg/proto/openapi/message_api/v1/authn.swagger.json new file mode 100644 index 00000000..ab7feabf --- /dev/null +++ b/pkg/proto/openapi/message_api/v1/authn.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_api/v1/authn.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_api/v1/message_api.swagger.json b/pkg/proto/openapi/message_api/v1/message_api.swagger.json new file mode 100644 index 00000000..8422b003 --- /dev/null +++ b/pkg/proto/openapi/message_api/v1/message_api.swagger.json @@ -0,0 +1,400 @@ +{ + "swagger": "2.0", + "info": { + "title": "MessageApi", + "version": "1.0" + }, + "tags": [ + { + "name": "MessageApi" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/message/v1/batch-query": { + "post": { + "summary": "BatchQuery containing a set of queries to be processed", + "operationId": "MessageApi_BatchQuery", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1BatchQueryResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1BatchQueryRequest" + } + } + ], + "tags": [ + "MessageApi" + ] + } + }, + "/message/v1/publish": { + "post": { + "summary": "Publish messages to the network", + "operationId": "MessageApi_Publish", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1PublishResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1PublishRequest" + } + } + ], + "tags": [ + "MessageApi" + ] + } + }, + "/message/v1/query": { + "post": { + "summary": "Query the store for messages", + "operationId": "MessageApi_Query", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1QueryResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1QueryRequest" + } + } + ], + "tags": [ + "MessageApi" + ] + } + }, + "/message/v1/subscribe": { + "post": { + "summary": "Subscribe to a stream of new envelopes matching a predicate", + "operationId": "MessageApi_Subscribe", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/v1Envelope" + }, + "error": { + "$ref": "#/definitions/rpcStatus" + } + }, + "title": "Stream result of v1Envelope" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SubscribeRequest" + } + } + ], + "tags": [ + "MessageApi" + ] + } + }, + "/message/v1/subscribe-all": { + "post": { + "summary": "Subscribe to a stream of all messages", + "operationId": "MessageApi_SubscribeAll", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/v1Envelope" + }, + "error": { + "$ref": "#/definitions/rpcStatus" + } + }, + "title": "Stream result of v1Envelope" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SubscribeAllRequest" + } + } + ], + "tags": [ + "MessageApi" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1BatchQueryRequest": { + "type": "object", + "properties": { + "requests": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1QueryRequest" + } + } + }, + "title": "BatchQuery" + }, + "v1BatchQueryResponse": { + "type": "object", + "properties": { + "responses": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1QueryResponse" + } + } + }, + "title": "Response containing a list of QueryResponse messages" + }, + "v1Cursor": { + "type": "object", + "properties": { + "index": { + "$ref": "#/definitions/v1IndexCursor" + } + }, + "title": "Wrapper for potentially multiple types of cursor" + }, + "v1Envelope": { + "type": "object", + "properties": { + "contentTopic": { + "type": "string", + "description": "The topic the message belongs to,\nIf the message includes the topic as well\nit MUST be the same as the topic in the envelope." + }, + "timestampNs": { + "type": "string", + "format": "uint64", + "description": "Message creation timestamp\nIf the message includes the timestamp as well\nit MUST be equivalent to the timestamp in the envelope." + }, + "message": { + "type": "string", + "format": "byte" + } + }, + "description": "Envelope encapsulates a message while in transit." + }, + "v1IndexCursor": { + "type": "object", + "properties": { + "digest": { + "type": "string", + "format": "byte" + }, + "senderTimeNs": { + "type": "string", + "format": "uint64" + } + }, + "title": "This is based off of the go-waku Index type, but with the\nreceiverTime and pubsubTopic removed for simplicity.\nBoth removed fields are optional" + }, + "v1PublishRequest": { + "type": "object", + "properties": { + "envelopes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Envelope" + } + } + }, + "title": "Publish" + }, + "v1PublishResponse": { + "type": "object", + "title": "Empty message as a response for Publish" + }, + "v1QueryRequest": { + "type": "object", + "properties": { + "contentTopics": { + "type": "array", + "items": { + "type": "string" + } + }, + "startTimeNs": { + "type": "string", + "format": "uint64" + }, + "endTimeNs": { + "type": "string", + "format": "uint64" + }, + "pagingInfo": { + "$ref": "#/definitions/xmtpmessage_apiv1PagingInfo" + } + }, + "title": "Query" + }, + "v1QueryResponse": { + "type": "object", + "properties": { + "envelopes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Envelope" + } + }, + "pagingInfo": { + "$ref": "#/definitions/xmtpmessage_apiv1PagingInfo" + } + }, + "title": "The response, containing envelopes, for a query" + }, + "v1SubscribeAllRequest": { + "type": "object", + "title": "SubscribeAll" + }, + "v1SubscribeRequest": { + "type": "object", + "properties": { + "contentTopics": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "title": "Subscribe" + }, + "xmtpmessage_apiv1PagingInfo": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "format": "int64", + "title": "Note: this is a uint32, while go-waku's pageSize is a uint64" + }, + "cursor": { + "$ref": "#/definitions/v1Cursor" + }, + "direction": { + "$ref": "#/definitions/xmtpmessage_apiv1SortDirection" + } + }, + "title": "This is based off of the go-waku PagingInfo struct, but with the direction\nchanged to our SortDirection enum format" + }, + "xmtpmessage_apiv1SortDirection": { + "type": "string", + "enum": [ + "SORT_DIRECTION_UNSPECIFIED", + "SORT_DIRECTION_ASCENDING", + "SORT_DIRECTION_DESCENDING" + ], + "default": "SORT_DIRECTION_UNSPECIFIED", + "title": "Sort direction" + } + } +} diff --git a/pkg/proto/openapi/message_contents/ciphertext.swagger.json b/pkg/proto/openapi/message_contents/ciphertext.swagger.json new file mode 100644 index 00000000..061e4559 --- /dev/null +++ b/pkg/proto/openapi/message_contents/ciphertext.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/ciphertext.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_contents/composite.swagger.json b/pkg/proto/openapi/message_contents/composite.swagger.json new file mode 100644 index 00000000..52a4d560 --- /dev/null +++ b/pkg/proto/openapi/message_contents/composite.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/composite.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_contents/contact.swagger.json b/pkg/proto/openapi/message_contents/contact.swagger.json new file mode 100644 index 00000000..68c1467f --- /dev/null +++ b/pkg/proto/openapi/message_contents/contact.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/contact.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_contents/content.swagger.json b/pkg/proto/openapi/message_contents/content.swagger.json new file mode 100644 index 00000000..fbc56136 --- /dev/null +++ b/pkg/proto/openapi/message_contents/content.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/content.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_contents/conversation_reference.swagger.json b/pkg/proto/openapi/message_contents/conversation_reference.swagger.json new file mode 100644 index 00000000..a8e15980 --- /dev/null +++ b/pkg/proto/openapi/message_contents/conversation_reference.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/conversation_reference.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_contents/ecies.swagger.json b/pkg/proto/openapi/message_contents/ecies.swagger.json new file mode 100644 index 00000000..0fa331aa --- /dev/null +++ b/pkg/proto/openapi/message_contents/ecies.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/ecies.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_contents/invitation.swagger.json b/pkg/proto/openapi/message_contents/invitation.swagger.json new file mode 100644 index 00000000..2e79efcc --- /dev/null +++ b/pkg/proto/openapi/message_contents/invitation.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/invitation.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_contents/message.swagger.json b/pkg/proto/openapi/message_contents/message.swagger.json new file mode 100644 index 00000000..550e2736 --- /dev/null +++ b/pkg/proto/openapi/message_contents/message.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/message.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_contents/private_key.swagger.json b/pkg/proto/openapi/message_contents/private_key.swagger.json new file mode 100644 index 00000000..0470b530 --- /dev/null +++ b/pkg/proto/openapi/message_contents/private_key.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/private_key.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_contents/private_preferences.swagger.json b/pkg/proto/openapi/message_contents/private_preferences.swagger.json new file mode 100644 index 00000000..cb316790 --- /dev/null +++ b/pkg/proto/openapi/message_contents/private_preferences.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/private_preferences.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_contents/public_key.swagger.json b/pkg/proto/openapi/message_contents/public_key.swagger.json new file mode 100644 index 00000000..74f4511d --- /dev/null +++ b/pkg/proto/openapi/message_contents/public_key.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/public_key.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_contents/signature.swagger.json b/pkg/proto/openapi/message_contents/signature.swagger.json new file mode 100644 index 00000000..438e408e --- /dev/null +++ b/pkg/proto/openapi/message_contents/signature.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/signature.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/message_contents/signed_payload.swagger.json b/pkg/proto/openapi/message_contents/signed_payload.swagger.json new file mode 100644 index 00000000..e75dcbb1 --- /dev/null +++ b/pkg/proto/openapi/message_contents/signed_payload.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/signed_payload.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/mls/api/v1/mls.swagger.json b/pkg/proto/openapi/mls/api/v1/mls.swagger.json new file mode 100644 index 00000000..9fe72050 --- /dev/null +++ b/pkg/proto/openapi/mls/api/v1/mls.swagger.json @@ -0,0 +1,925 @@ +{ + "swagger": "2.0", + "info": { + "title": "MlsApi", + "version": "1.0" + }, + "tags": [ + { + "name": "MlsApi" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/mls/v1/fetch-key-packages": { + "post": { + "summary": "Get one or more Key Packages by installation_id", + "operationId": "MlsApi_FetchKeyPackages", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1FetchKeyPackagesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1FetchKeyPackagesRequest" + } + } + ], + "tags": [ + "MlsApi" + ] + } + }, + "/mls/v1/get-identity-updates": { + "post": { + "summary": "Used to check for changes related to members of a group.\nWould return an array of any new installations associated with the wallet\naddress, and any revocations that have happened.", + "operationId": "MlsApi_GetIdentityUpdates", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetIdentityUpdatesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetIdentityUpdatesRequest" + } + } + ], + "tags": [ + "MlsApi" + ] + } + }, + "/mls/v1/query-group-messages": { + "post": { + "summary": "Query stored group messages", + "operationId": "MlsApi_QueryGroupMessages", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1QueryGroupMessagesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1QueryGroupMessagesRequest" + } + } + ], + "tags": [ + "MlsApi" + ] + } + }, + "/mls/v1/query-welcome-messages": { + "post": { + "summary": "Query stored group messages", + "operationId": "MlsApi_QueryWelcomeMessages", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1QueryWelcomeMessagesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1QueryWelcomeMessagesRequest" + } + } + ], + "tags": [ + "MlsApi" + ] + } + }, + "/mls/v1/register-installation": { + "post": { + "summary": "Register a new installation, which would be validated before storage", + "operationId": "MlsApi_RegisterInstallation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RegisterInstallationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RegisterInstallationRequest" + } + } + ], + "tags": [ + "MlsApi" + ] + } + }, + "/mls/v1/revoke-installation": { + "post": { + "summary": "Would delete all key packages associated with the installation and mark\nthe installation as having been revoked", + "operationId": "MlsApi_RevokeInstallation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RevokeInstallationRequest" + } + } + ], + "tags": [ + "MlsApi" + ] + } + }, + "/mls/v1/send-group-messages": { + "post": { + "summary": "Send a MLS payload, that would be validated before being stored to the\nnetwork", + "operationId": "MlsApi_SendGroupMessages", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SendGroupMessagesRequest" + } + } + ], + "tags": [ + "MlsApi" + ] + } + }, + "/mls/v1/send-welcome-messages": { + "post": { + "summary": "Send a batch of welcome messages", + "operationId": "MlsApi_SendWelcomeMessages", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SendWelcomeMessagesRequest" + } + } + ], + "tags": [ + "MlsApi" + ] + } + }, + "/mls/v1/subscribe-group-messages": { + "post": { + "summary": "Subscribe stream of new group messages", + "operationId": "MlsApi_SubscribeGroupMessages", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/apiv1GroupMessage" + }, + "error": { + "$ref": "#/definitions/rpcStatus" + } + }, + "title": "Stream result of apiv1GroupMessage" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SubscribeGroupMessagesRequest" + } + } + ], + "tags": [ + "MlsApi" + ] + } + }, + "/mls/v1/subscribe-welcome-messages": { + "post": { + "summary": "Subscribe stream of new welcome messages", + "operationId": "MlsApi_SubscribeWelcomeMessages", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/v1WelcomeMessage" + }, + "error": { + "$ref": "#/definitions/rpcStatus" + } + }, + "title": "Stream result of v1WelcomeMessage" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SubscribeWelcomeMessagesRequest" + } + } + ], + "tags": [ + "MlsApi" + ] + } + }, + "/mls/v1/upload-key-package": { + "post": { + "summary": "Upload a new KeyPackage, which would be validated before storage", + "operationId": "MlsApi_UploadKeyPackage", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UploadKeyPackageRequest" + } + } + ], + "tags": [ + "MlsApi" + ] + } + } + }, + "definitions": { + "GetIdentityUpdatesResponseNewInstallationUpdate": { + "type": "object", + "properties": { + "installationKey": { + "type": "string", + "format": "byte" + }, + "credentialIdentity": { + "type": "string", + "format": "byte" + } + }, + "title": "A new installation key was seen for the first time by the nodes" + }, + "GetIdentityUpdatesResponseRevokedInstallationUpdate": { + "type": "object", + "properties": { + "installationKey": { + "type": "string", + "format": "byte" + } + }, + "title": "An installation was revoked" + }, + "GetIdentityUpdatesResponseUpdate": { + "type": "object", + "properties": { + "timestampNs": { + "type": "string", + "format": "uint64" + }, + "newInstallation": { + "$ref": "#/definitions/GetIdentityUpdatesResponseNewInstallationUpdate" + }, + "revokedInstallation": { + "$ref": "#/definitions/GetIdentityUpdatesResponseRevokedInstallationUpdate" + } + }, + "title": "A wrapper for any update to the wallet" + }, + "GetIdentityUpdatesResponseWalletUpdates": { + "type": "object", + "properties": { + "updates": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/GetIdentityUpdatesResponseUpdate" + } + } + }, + "title": "A wrapper for the updates for a single wallet" + }, + "SignatureECDSACompact": { + "type": "object", + "properties": { + "bytes": { + "type": "string", + "format": "byte", + "title": "compact representation [ R || S ], 64 bytes" + }, + "recovery": { + "type": "integer", + "format": "int64", + "title": "recovery bit" + } + }, + "title": "ECDSA signature bytes and the recovery bit" + }, + "SignatureWalletECDSACompact": { + "type": "object", + "properties": { + "bytes": { + "type": "string", + "format": "byte", + "title": "compact representation [ R || S ], 64 bytes" + }, + "recovery": { + "type": "integer", + "format": "int64", + "title": "recovery bit" + } + }, + "description": "ECDSA signature bytes and the recovery bit\nproduced by xmtp-js::PublicKey.signWithWallet function, i.e.\nEIP-191 signature of a \"Create Identity\" message with the key embedded.\nUsed to sign identity keys." + }, + "apiv1GroupMessage": { + "type": "object", + "properties": { + "v1": { + "$ref": "#/definitions/v1GroupMessageV1" + } + }, + "title": "Full representation of a group message" + }, + "message_contentsSignature": { + "type": "object", + "properties": { + "ecdsaCompact": { + "$ref": "#/definitions/SignatureECDSACompact" + }, + "walletEcdsaCompact": { + "$ref": "#/definitions/SignatureWalletECDSACompact" + } + }, + "description": "Signature represents a generalized public key signature,\ndefined as a union to support cryptographic algorithm agility." + }, + "mlsapiv1PagingInfo": { + "type": "object", + "properties": { + "direction": { + "$ref": "#/definitions/mlsapiv1SortDirection" + }, + "limit": { + "type": "integer", + "format": "int64" + }, + "idCursor": { + "type": "string", + "format": "uint64" + } + }, + "title": "Pagination config for queries" + }, + "mlsapiv1SortDirection": { + "type": "string", + "enum": [ + "SORT_DIRECTION_UNSPECIFIED", + "SORT_DIRECTION_ASCENDING", + "SORT_DIRECTION_DESCENDING" + ], + "default": "SORT_DIRECTION_UNSPECIFIED", + "title": "Sort direction for queries" + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1FetchKeyPackagesRequest": { + "type": "object", + "properties": { + "installationKeys": { + "type": "array", + "items": { + "type": "string", + "format": "byte" + }, + "title": "The caller can provide an array of installation keys, and the API\nwill return one key package for each installation associated with each\ninstallation key" + } + }, + "title": "Fetch one or more key packages" + }, + "v1FetchKeyPackagesResponse": { + "type": "object", + "properties": { + "keyPackages": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1FetchKeyPackagesResponseKeyPackage" + }, + "description": "Returns one key package per installation in the original order of the\nrequest. If any installations are missing key packages, an empty entry is\nleft in their respective spots in the array." + } + }, + "title": "The response to a FetchKeyPackagesRequest" + }, + "v1FetchKeyPackagesResponseKeyPackage": { + "type": "object", + "properties": { + "keyPackageTlsSerialized": { + "type": "string", + "format": "byte" + } + }, + "title": "An individual key package" + }, + "v1GetIdentityUpdatesRequest": { + "type": "object", + "properties": { + "accountAddresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "startTimeNs": { + "type": "string", + "format": "uint64" + } + }, + "title": "Get all updates for an identity since the specified time" + }, + "v1GetIdentityUpdatesResponse": { + "type": "object", + "properties": { + "updates": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/GetIdentityUpdatesResponseWalletUpdates" + }, + "title": "A list of updates (or empty objects if no changes) in the original order\nof the request" + } + }, + "title": "Used to get any new or revoked installations for a list of wallet addresses" + }, + "v1GroupMessageInput": { + "type": "object", + "properties": { + "v1": { + "$ref": "#/definitions/v1GroupMessageInputV1" + } + }, + "title": "Input type for a group message" + }, + "v1GroupMessageInputV1": { + "type": "object", + "properties": { + "data": { + "type": "string", + "format": "byte" + } + }, + "title": "Version 1 of the GroupMessageInput payload format" + }, + "v1GroupMessageV1": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uint64" + }, + "createdNs": { + "type": "string", + "format": "uint64" + }, + "groupId": { + "type": "string", + "format": "byte" + }, + "data": { + "type": "string", + "format": "byte" + } + }, + "title": "Version 1 of the GroupMessage format" + }, + "v1KeyPackageUpload": { + "type": "object", + "properties": { + "keyPackageTlsSerialized": { + "type": "string", + "format": "byte", + "description": "The owner's wallet address would be extracted from the identity\ncredential in the key package, and all signatures would be validated." + } + }, + "description": "This would be a serialized MLS key package that the node would\n parse, validate, and then store.", + "title": "A wrapper around the Key Package bytes" + }, + "v1QueryGroupMessagesRequest": { + "type": "object", + "properties": { + "groupId": { + "type": "string", + "format": "byte" + }, + "pagingInfo": { + "$ref": "#/definitions/mlsapiv1PagingInfo" + } + }, + "title": "Request for group message queries" + }, + "v1QueryGroupMessagesResponse": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/apiv1GroupMessage" + } + }, + "pagingInfo": { + "$ref": "#/definitions/mlsapiv1PagingInfo" + } + }, + "title": "Response for group message queries" + }, + "v1QueryWelcomeMessagesRequest": { + "type": "object", + "properties": { + "installationKey": { + "type": "string", + "format": "byte" + }, + "pagingInfo": { + "$ref": "#/definitions/mlsapiv1PagingInfo" + } + }, + "title": "Request for welcome message queries" + }, + "v1QueryWelcomeMessagesResponse": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1WelcomeMessage" + } + }, + "pagingInfo": { + "$ref": "#/definitions/mlsapiv1PagingInfo" + } + }, + "title": "Response for welcome message queries" + }, + "v1RegisterInstallationRequest": { + "type": "object", + "properties": { + "keyPackage": { + "$ref": "#/definitions/v1KeyPackageUpload", + "title": "The Key Package contains all information needed to register an installation" + } + }, + "title": "Register a new installation" + }, + "v1RegisterInstallationResponse": { + "type": "object", + "properties": { + "installationKey": { + "type": "string", + "format": "byte" + } + }, + "title": "The response to a RegisterInstallationRequest" + }, + "v1RevokeInstallationRequest": { + "type": "object", + "properties": { + "installationKey": { + "type": "string", + "format": "byte" + }, + "walletSignature": { + "$ref": "#/definitions/message_contentsSignature", + "title": "All revocations must be validated with a wallet signature over the\ninstallation_id being revoked (and some sort of standard prologue)" + } + }, + "title": "Revoke an installation" + }, + "v1SendGroupMessagesRequest": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1GroupMessageInput" + } + } + }, + "title": "Send a batch of MLS messages" + }, + "v1SendWelcomeMessagesRequest": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1WelcomeMessageInput" + } + } + }, + "title": "Send a batch of welcome messages" + }, + "v1SubscribeGroupMessagesRequest": { + "type": "object", + "properties": { + "filters": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1SubscribeGroupMessagesRequestFilter" + } + } + }, + "title": "Request for subscribing to group messages" + }, + "v1SubscribeGroupMessagesRequestFilter": { + "type": "object", + "properties": { + "groupId": { + "type": "string", + "format": "byte" + }, + "idCursor": { + "type": "string", + "format": "uint64" + } + }, + "title": "Subscription filter" + }, + "v1SubscribeWelcomeMessagesRequest": { + "type": "object", + "properties": { + "filters": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1SubscribeWelcomeMessagesRequestFilter" + } + } + }, + "title": "Request for subscribing to welcome messages" + }, + "v1SubscribeWelcomeMessagesRequestFilter": { + "type": "object", + "properties": { + "installationKey": { + "type": "string", + "format": "byte" + }, + "idCursor": { + "type": "string", + "format": "uint64" + } + }, + "title": "Subscription filter" + }, + "v1UploadKeyPackageRequest": { + "type": "object", + "properties": { + "keyPackage": { + "$ref": "#/definitions/v1KeyPackageUpload", + "title": "An individual key package upload request" + } + }, + "title": "Upload a new key packages" + }, + "v1WelcomeMessage": { + "type": "object", + "properties": { + "v1": { + "$ref": "#/definitions/v1WelcomeMessageV1" + } + }, + "title": "Full representation of a welcome message" + }, + "v1WelcomeMessageInput": { + "type": "object", + "properties": { + "v1": { + "$ref": "#/definitions/v1WelcomeMessageInputV1" + } + }, + "title": "Input type for a welcome message" + }, + "v1WelcomeMessageInputV1": { + "type": "object", + "properties": { + "installationKey": { + "type": "string", + "format": "byte" + }, + "data": { + "type": "string", + "format": "byte" + } + }, + "title": "Version 1 of the WelcomeMessageInput format" + }, + "v1WelcomeMessageV1": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uint64" + }, + "createdNs": { + "type": "string", + "format": "uint64" + }, + "installationKey": { + "type": "string", + "format": "byte" + }, + "data": { + "type": "string", + "format": "byte" + } + }, + "title": "Version 1 of the WelcomeMessage format" + } + } +} diff --git a/pkg/proto/openapi/mls/database/intents.swagger.json b/pkg/proto/openapi/mls/database/intents.swagger.json new file mode 100644 index 00000000..fe25a98f --- /dev/null +++ b/pkg/proto/openapi/mls/database/intents.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "mls/database/intents.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/mls/message_contents/association.swagger.json b/pkg/proto/openapi/mls/message_contents/association.swagger.json new file mode 100644 index 00000000..775a7ac8 --- /dev/null +++ b/pkg/proto/openapi/mls/message_contents/association.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "mls/message_contents/association.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/mls/message_contents/content.swagger.json b/pkg/proto/openapi/mls/message_contents/content.swagger.json new file mode 100644 index 00000000..19b2b0c6 --- /dev/null +++ b/pkg/proto/openapi/mls/message_contents/content.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "mls/message_contents/content.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/mls/message_contents/credential.swagger.json b/pkg/proto/openapi/mls/message_contents/credential.swagger.json new file mode 100644 index 00000000..781e3809 --- /dev/null +++ b/pkg/proto/openapi/mls/message_contents/credential.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "mls/message_contents/credential.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/mls/message_contents/group_metadata.swagger.json b/pkg/proto/openapi/mls/message_contents/group_metadata.swagger.json new file mode 100644 index 00000000..70c1998d --- /dev/null +++ b/pkg/proto/openapi/mls/message_contents/group_metadata.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "mls/message_contents/group_metadata.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/mls/message_contents/transcript_messages.swagger.json b/pkg/proto/openapi/mls/message_contents/transcript_messages.swagger.json new file mode 100644 index 00000000..1b8d1742 --- /dev/null +++ b/pkg/proto/openapi/mls/message_contents/transcript_messages.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "mls/message_contents/transcript_messages.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/pkg/proto/openapi/mls_validation/v1/service.swagger.json b/pkg/proto/openapi/mls_validation/v1/service.swagger.json new file mode 100644 index 00000000..9a0048c7 --- /dev/null +++ b/pkg/proto/openapi/mls_validation/v1/service.swagger.json @@ -0,0 +1,137 @@ +{ + "swagger": "2.0", + "info": { + "title": "mls_validation/v1/service.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "ValidationApi" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1ValidateGroupMessagesRequestGroupMessage": { + "type": "object", + "properties": { + "groupMessageBytesTlsSerialized": { + "type": "string", + "format": "byte" + } + }, + "title": "Wrapper for each message" + }, + "v1ValidateGroupMessagesResponse": { + "type": "object", + "properties": { + "responses": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ValidateGroupMessagesResponseValidationResponse" + } + } + }, + "title": "Response to ValidateGroupMessagesRequest" + }, + "v1ValidateGroupMessagesResponseValidationResponse": { + "type": "object", + "properties": { + "isOk": { + "type": "boolean" + }, + "errorMessage": { + "type": "string" + }, + "groupId": { + "type": "string" + } + }, + "title": "An individual response to one message" + }, + "v1ValidateKeyPackagesRequestKeyPackage": { + "type": "object", + "properties": { + "keyPackageBytesTlsSerialized": { + "type": "string", + "format": "byte" + } + }, + "title": "Wrapper for each key package" + }, + "v1ValidateKeyPackagesResponse": { + "type": "object", + "properties": { + "responses": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ValidateKeyPackagesResponseValidationResponse" + } + } + }, + "title": "Response to ValidateKeyPackagesRequest" + }, + "v1ValidateKeyPackagesResponseValidationResponse": { + "type": "object", + "properties": { + "isOk": { + "type": "boolean" + }, + "errorMessage": { + "type": "string" + }, + "installationId": { + "type": "string", + "format": "byte" + }, + "accountAddress": { + "type": "string" + }, + "credentialIdentityBytes": { + "type": "string", + "format": "byte" + }, + "expiration": { + "type": "string", + "format": "uint64" + } + }, + "title": "An individual response to one key package" + } + } +} diff --git a/pkg/proto/openapi/openapi.go b/pkg/proto/openapi/openapi.go new file mode 100644 index 00000000..1cf197ad --- /dev/null +++ b/pkg/proto/openapi/openapi.go @@ -0,0 +1,8 @@ +package openapi + +import ( + _ "embed" +) + +//go:embed message_api/v1/message_api.swagger.json +var JSON []byte diff --git a/pkg/store/cleaner_test.go b/pkg/store/cleaner_test.go index 300b2e1d..a44039ed 100644 --- a/pkg/store/cleaner_test.go +++ b/pkg/store/cleaner_test.go @@ -5,7 +5,7 @@ import ( "time" "github.com/stretchr/testify/require" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" test "github.com/xmtp/xmtp-node-go/pkg/testing" ) diff --git a/pkg/store/query.go b/pkg/store/query.go index d668be87..ca08fc39 100644 --- a/pkg/store/query.go +++ b/pkg/store/query.go @@ -5,7 +5,7 @@ import ( "database/sql" sqlBuilder "github.com/huandu/go-sqlbuilder" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" ) func (s *Store) Query(query *messagev1.QueryRequest) (res *messagev1.QueryResponse, err error) { diff --git a/pkg/store/query_test.go b/pkg/store/query_test.go index 5d084e4a..ff7fcd42 100644 --- a/pkg/store/query_test.go +++ b/pkg/store/query_test.go @@ -6,7 +6,7 @@ import ( _ "github.com/mattn/go-sqlite3" // Blank import to register the sqlite3 driver "github.com/stretchr/testify/require" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" test "github.com/xmtp/xmtp-node-go/pkg/testing" ) diff --git a/pkg/store/store.go b/pkg/store/store.go index 71e17d9a..20315483 100644 --- a/pkg/store/store.go +++ b/pkg/store/store.go @@ -10,10 +10,10 @@ import ( "github.com/uptrace/bun/dialect/pgdialect" "github.com/uptrace/bun/driver/pgdriver" "github.com/uptrace/bun/migrate" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" "github.com/xmtp/xmtp-node-go/pkg/logging" "github.com/xmtp/xmtp-node-go/pkg/metrics" "github.com/xmtp/xmtp-node-go/pkg/migrations/messages" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" "github.com/xmtp/xmtp-node-go/pkg/tracing" "go.uber.org/zap" ) diff --git a/pkg/store/store_test.go b/pkg/store/store_test.go index cd71c420..b3adad2d 100644 --- a/pkg/store/store_test.go +++ b/pkg/store/store_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" test "github.com/xmtp/xmtp-node-go/pkg/testing" ) diff --git a/pkg/testing/message.go b/pkg/testing/message.go index 8340dc85..7efe9169 100644 --- a/pkg/testing/message.go +++ b/pkg/testing/message.go @@ -1,7 +1,7 @@ package testing import ( - messagev1 "github.com/xmtp/proto/v3/go/message_api/v1" + messagev1 "github.com/xmtp/xmtp-node-go/pkg/proto/message_api/v1" ) func NewEnvelope(contentTopic string, timestamp uint64, content string) *messagev1.Envelope {