From 43d25295a718752699cf0c239c38acce2db6f708 Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Sat, 27 Jul 2024 20:32:07 -0700 Subject: [PATCH] bootstrap service --- .gitignore | 22 + .vscode/extensions.json | 9 + .vscode/settings.json | 7 + buf.gen.yaml | 28 + cmd/replication/main.go | 116 + dev/.golangci.yaml | 8 + dev/docker/Dockerfile | 36 + dev/docker/compose | 5 + dev/docker/docker-compose.yml | 14 + dev/docker/env | 6 + dev/docker/prometheus.yml | 9 + dev/docker/up | 6 + dev/generate | 12 + dev/up | 11 + go.mod | 53 + go.sum | 210 + pkg/api/server.go | 99 + pkg/api/service.go | 30 + pkg/proto/identity/api/v1/identity.pb.go | 925 ++++ pkg/proto/identity/api/v1/identity.pb.gw.go | 317 ++ pkg/proto/identity/api/v1/identity_grpc.pb.go | 197 + .../identity/associations/association.pb.go | 1166 +++++ .../identity/associations/signature.pb.go | 583 +++ pkg/proto/identity/credential.pb.go | 156 + pkg/proto/keystore_api/v1/keystore.pb.go | 4044 +++++++++++++++++ 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 | 453 ++ pkg/proto/message_contents/composite.pb.go | 276 ++ pkg/proto/message_contents/contact.pb.go | 351 ++ pkg/proto/message_contents/content.pb.go | 479 ++ .../conversation_reference.pb.go | 215 + pkg/proto/message_contents/ecies.pb.go | 183 + pkg/proto/message_contents/frames.pb.go | 363 ++ pkg/proto/message_contents/invitation.pb.go | 816 ++++ pkg/proto/message_contents/message.pb.go | 718 +++ pkg/proto/message_contents/private_key.pb.go | 925 ++++ .../private_preferences.pb.go | 790 ++++ pkg/proto/message_contents/public_key.pb.go | 698 +++ pkg/proto/message_contents/signature.pb.go | 361 ++ .../message_contents/signed_payload.pb.go | 177 + pkg/proto/mls/api/v1/mls.pb.go | 2907 ++++++++++++ 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 | 1649 +++++++ .../mls/message_contents/association.pb.go | 590 +++ pkg/proto/mls/message_contents/content.pb.go | 998 ++++ .../mls/message_contents/credential.pb.go | 381 ++ .../message_contents/group_membership.pb.go | 173 + .../mls/message_contents/group_metadata.pb.go | 255 ++ .../group_mutable_metadata.pb.go | 268 ++ .../message_contents/group_permissions.pb.go | 1344 ++++++ .../transcript_messages.pb.go | 572 +++ pkg/proto/mls_validation/v1/service.pb.go | 1452 ++++++ .../mls_validation/v1/service_grpc.pb.go | 273 ++ .../identity/api/v1/identity.swagger.json | 524 +++ .../associations/association.swagger.json | 44 + .../associations/signature.swagger.json | 44 + .../openapi/identity/credential.swagger.json | 44 + .../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/frames.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 | 948 ++++ .../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_membership.swagger.json | 44 + .../group_metadata.swagger.json | 44 + .../group_mutable_metadata.swagger.json | 44 + .../group_permissions.swagger.json | 44 + .../transcript_messages.swagger.json | 44 + .../mls_validation/v1/service.swagger.json | 559 +++ .../message_api/message_api.swagger.json | 249 + .../xmtpv4/message_api/message_api.pb.go | 1352 ++++++ .../xmtpv4/message_api/message_api.pb.gw.go | 217 + .../xmtpv4/message_api/message_api_grpc.pb.go | 174 + pkg/registry/registry.go | 32 + pkg/server/options.go | 27 + pkg/server/server.go | 76 + pkg/server/server_test.go | 45 + pkg/testing/log.go | 25 + pkg/testing/random.go | 35 + pkg/tracing/tracing.go | 113 + pkg/tracing/tracing_test.go | 40 + pkg/utils/hex.go | 19 + pkg/utils/sleep.go | 10 + 103 files changed, 35491 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 buf.gen.yaml create mode 100644 cmd/replication/main.go create mode 100644 dev/.golangci.yaml create mode 100644 dev/docker/Dockerfile create mode 100755 dev/docker/compose create mode 100644 dev/docker/docker-compose.yml create mode 100755 dev/docker/env create mode 100644 dev/docker/prometheus.yml create mode 100755 dev/docker/up create mode 100755 dev/generate create mode 100755 dev/up create mode 100644 go.mod create mode 100644 go.sum create mode 100644 pkg/api/server.go create mode 100644 pkg/api/service.go create mode 100644 pkg/proto/identity/api/v1/identity.pb.go create mode 100644 pkg/proto/identity/api/v1/identity.pb.gw.go create mode 100644 pkg/proto/identity/api/v1/identity_grpc.pb.go create mode 100644 pkg/proto/identity/associations/association.pb.go create mode 100644 pkg/proto/identity/associations/signature.pb.go create mode 100644 pkg/proto/identity/credential.pb.go 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/frames.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_membership.pb.go create mode 100644 pkg/proto/mls/message_contents/group_metadata.pb.go create mode 100644 pkg/proto/mls/message_contents/group_mutable_metadata.pb.go create mode 100644 pkg/proto/mls/message_contents/group_permissions.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/identity/api/v1/identity.swagger.json create mode 100644 pkg/proto/openapi/identity/associations/association.swagger.json create mode 100644 pkg/proto/openapi/identity/associations/signature.swagger.json create mode 100644 pkg/proto/openapi/identity/credential.swagger.json 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/frames.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_membership.swagger.json create mode 100644 pkg/proto/openapi/mls/message_contents/group_metadata.swagger.json create mode 100644 pkg/proto/openapi/mls/message_contents/group_mutable_metadata.swagger.json create mode 100644 pkg/proto/openapi/mls/message_contents/group_permissions.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/xmtpv4/message_api/message_api.swagger.json create mode 100644 pkg/proto/xmtpv4/message_api/message_api.pb.go create mode 100644 pkg/proto/xmtpv4/message_api/message_api.pb.gw.go create mode 100644 pkg/proto/xmtpv4/message_api/message_api_grpc.pb.go create mode 100644 pkg/registry/registry.go create mode 100644 pkg/server/options.go create mode 100644 pkg/server/server.go create mode 100644 pkg/server/server_test.go create mode 100644 pkg/testing/log.go create mode 100644 pkg/testing/random.go create mode 100644 pkg/tracing/tracing.go create mode 100644 pkg/tracing/tracing_test.go create mode 100644 pkg/utils/hex.go create mode 100644 pkg/utils/sleep.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..9c18e633 --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# build folder +build/ +bin/ + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +*.db +.DS_STORE + +# Dependency directories (remove the comment below to include it) +# vendor/ diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..a72345bb --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. + // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp + + // List of extensions which should be recommended for users of this workspace. + "recommendations": ["bradymholt.pgformatter", "golang.go"], + // List of extensions recommended by VS Code that should not be recommended for users of this workspace. + "unwantedRecommendations": [] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..f11a28f2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "pgFormatter.typeCase": "uppercase", + "pgFormatter.tabs": true, + "[sql]": { + "editor.defaultFormatter": "bradymholt.pgformatter" + } +} diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 00000000..844f03db --- /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/xmtpd/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/cmd/replication/main.go b/cmd/replication/main.go new file mode 100644 index 00000000..7a981706 --- /dev/null +++ b/cmd/replication/main.go @@ -0,0 +1,116 @@ +package main + +import ( + "context" + "log" + "os" + "os/signal" + "sync" + "syscall" + + "github.com/jessevdk/go-flags" + "github.com/xmtp/xmtpd/pkg/registry" + "github.com/xmtp/xmtpd/pkg/server" + "github.com/xmtp/xmtpd/pkg/tracing" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" +) + +var Commit string + +var options server.Options + +func main() { + if _, err := flags.Parse(&options); err != nil { + if err, ok := err.(*flags.Error); !ok || err.Type != flags.ErrHelp { + fatal("Could not parse options: %s", err) + } + return + } + addEnvVars() + + log, _, err := buildLogger(options) + if err != nil { + fatal("Could not build logger: %s", err) + } + + ctx, cancel := context.WithCancel(context.Background()) + + var wg sync.WaitGroup + doneC := make(chan bool, 1) + tracing.GoPanicWrap(ctx, &wg, "main", func(ctx context.Context) { + s, err := server.New(ctx, log, options, registry.NewFixedNodeRegistry([]registry.Node{})) + if err != nil { + log.Fatal("initializing server", zap.Error(err)) + } + s.WaitForShutdown() + doneC <- true + }) + + sigC := make(chan os.Signal, 1) + signal.Notify(sigC, + syscall.SIGHUP, + syscall.SIGINT, + syscall.SIGTERM, + syscall.SIGQUIT, + ) + select { + case sig := <-sigC: + log.Info("ending on signal", zap.String("signal", sig.String())) + case <-doneC: + } + cancel() + wg.Wait() +} + +func addEnvVars() { + if connStr, hasConnstr := os.LookupEnv("WRITER_DB_CONNECTION_STRING"); hasConnstr { + options.DB.WriterConnectionString = connStr + } + + if connStr, hasConnstr := os.LookupEnv("READER_DB_CONNECTION_STRING"); hasConnstr { + options.DB.WriterConnectionString = connStr + } + + if privKey, hasPrivKey := os.LookupEnv("PRIVATE_KEY"); hasPrivKey { + options.PrivateKeyString = privKey + } +} + +func fatal(msg string, args ...any) { + log.Fatalf(msg, args...) +} + +func buildLogger(options server.Options) (*zap.Logger, *zap.Config, error) { + atom := zap.NewAtomicLevel() + level := zapcore.InfoLevel + err := level.Set(options.LogLevel) + if err != nil { + return nil, nil, err + } + atom.SetLevel(level) + + cfg := zap.Config{ + Encoding: options.LogEncoding, + Level: atom, + OutputPaths: []string{"stdout"}, + ErrorOutputPaths: []string{"stderr"}, + EncoderConfig: zapcore.EncoderConfig{ + MessageKey: "message", + LevelKey: "level", + EncodeLevel: zapcore.CapitalLevelEncoder, + TimeKey: "time", + EncodeTime: zapcore.ISO8601TimeEncoder, + NameKey: "caller", + EncodeCaller: zapcore.ShortCallerEncoder, + }, + } + log, err := cfg.Build() + if err != nil { + return nil, nil, err + } + + log = log.Named("replication") + + return log, &cfg, nil +} diff --git a/dev/.golangci.yaml b/dev/.golangci.yaml new file mode 100644 index 00000000..13c7ac3a --- /dev/null +++ b/dev/.golangci.yaml @@ -0,0 +1,8 @@ +linters: + # Disable all linters. + Default: true + # Enable specific linter + # https://golangci-lint.run/usage/linters/#enabled-by-default-linters + enable: + - nakedret + - nilerr diff --git a/dev/docker/Dockerfile b/dev/docker/Dockerfile new file mode 100644 index 00000000..d336d374 --- /dev/null +++ b/dev/docker/Dockerfile @@ -0,0 +1,36 @@ +# BUILD IMAGE -------------------------------------------------------- +ARG GO_VERSION=unknown +FROM golang:${GO_VERSION}-alpine as builder + +# Get build tools and required header files +RUN apk add --no-cache build-base + +WORKDIR /app +COPY . . + +# Build the final node binary +ARG GIT_COMMIT=unknown +RUN go build -ldflags="-X 'main.Commit=$GIT_COMMIT'" -o bin/xmtpd cmd/replication/main.go + +# ACTUAL IMAGE ------------------------------------------------------- + +FROM alpine:3.12 + +ARG GIT_COMMIT=unknown + +LABEL maintainer="engineering@xmtp.com" +LABEL source="https://github.com/xmtp/xmtpd" +LABEL description="XMTP Node Software" +LABEL commit=$GIT_COMMIT + +# color, nocolor, json +ENV GOLOG_LOG_FMT=nocolor + +# go-waku default port +EXPOSE 9000 + +COPY --from=builder /app/bin/xmtpd /usr/bin/ + +ENTRYPOINT ["/usr/bin/xmtpd"] +# By default just show help if called without arguments +CMD ["--help"] diff --git a/dev/docker/compose b/dev/docker/compose new file mode 100755 index 00000000..ccc617d3 --- /dev/null +++ b/dev/docker/compose @@ -0,0 +1,5 @@ +#!/bin/bash +set -e +. dev/docker/env + +docker_compose "$@" diff --git a/dev/docker/docker-compose.yml b/dev/docker/docker-compose.yml new file mode 100644 index 00000000..efd3c547 --- /dev/null +++ b/dev/docker/docker-compose.yml @@ -0,0 +1,14 @@ +services: + db: + image: postgres:16 + environment: + POSTGRES_PASSWORD: xmtp + ports: + - 8765:5432 + + prometheus: + image: prom/prometheus + ports: + - 9090:9090 + volumes: + - ./prometheus.yml:/etc/prometheus/prometheus.yml diff --git a/dev/docker/env b/dev/docker/env new file mode 100755 index 00000000..f4b6cead --- /dev/null +++ b/dev/docker/env @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +function docker_compose() { + docker-compose -f dev/docker/docker-compose.yml -p xmtpd "$@" +} diff --git a/dev/docker/prometheus.yml b/dev/docker/prometheus.yml new file mode 100644 index 00000000..2a56bc79 --- /dev/null +++ b/dev/docker/prometheus.yml @@ -0,0 +1,9 @@ +global: + scrape_interval: 10s + +scrape_configs: + - job_name: prometheus + static_configs: + - targets: + - "host.docker.internal:8008" + - "host.docker.internal:8009" diff --git a/dev/docker/up b/dev/docker/up new file mode 100755 index 00000000..726258bb --- /dev/null +++ b/dev/docker/up @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +. dev/docker/env + +docker_compose build +docker_compose up -d --remove-orphans diff --git a/dev/generate b/dev/generate new file mode 100755 index 00000000..b4e845f6 --- /dev/null +++ b/dev/generate @@ -0,0 +1,12 @@ +#!/usr/bin/env sh +set -e + +go generate ./... + +# Generate mocks +# mockery +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=rich/xmtpv4,subdir=proto; then + echo "Failed to generate protobuf definitions" + exit 1 +fi \ No newline at end of file diff --git a/dev/up b/dev/up new file mode 100755 index 00000000..44e85150 --- /dev/null +++ b/dev/up @@ -0,0 +1,11 @@ +#!/bin/bash +set -e + +go mod tidy + +if ! which golangci-lint &>/dev/null; then brew install golangci-lint; fi +if ! which shellcheck &>/dev/null; then brew install shellcheck; fi +if ! which mockery &>/dev/null; then brew install mockery; fi + +dev/generate +dev/docker/up diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..4af5a748 --- /dev/null +++ b/go.mod @@ -0,0 +1,53 @@ +module github.com/xmtp/xmtpd + +go 1.22 + +require ( + github.com/ethereum/go-ethereum v1.14.7 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 + github.com/jessevdk/go-flags v1.6.1 + github.com/pires/go-proxyproto v0.7.0 + github.com/stretchr/testify v1.9.0 + go.uber.org/zap v1.27.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f + google.golang.org/grpc v1.65.0 + google.golang.org/protobuf v1.34.2 + gopkg.in/DataDog/dd-trace-go.v1 v1.66.0 +) + +require ( + github.com/DataDog/appsec-internal-go v1.6.0 // indirect + github.com/DataDog/datadog-agent/pkg/obfuscate v0.48.0 // indirect + github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.48.1 // indirect + github.com/DataDog/datadog-go/v5 v5.3.0 // indirect + github.com/DataDog/go-libddwaf/v3 v3.2.1 // indirect + github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect + github.com/DataDog/sketches-go v1.4.5 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect + github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/ebitengine/purego v0.6.0-alpha.5 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/holiman/uint256 v1.3.0 // indirect + github.com/outcaste-io/ristretto v0.2.3 // indirect + github.com/philhofer/fwd v1.1.2 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect + github.com/tinylib/msgp v1.1.8 // indirect + go.uber.org/atomic v1.11.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/crypto v0.24.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..e8486299 --- /dev/null +++ b/go.sum @@ -0,0 +1,210 @@ +github.com/DataDog/appsec-internal-go v1.6.0 h1:QHvPOv/O0s2fSI/BraZJNpRDAtdlrRm5APJFZNBxjAw= +github.com/DataDog/appsec-internal-go v1.6.0/go.mod h1:pEp8gjfNLtEOmz+iZqC8bXhu0h4k7NUsW/qiQb34k1U= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.48.0 h1:bUMSNsw1iofWiju9yc1f+kBd33E3hMJtq9GuU602Iy8= +github.com/DataDog/datadog-agent/pkg/obfuscate v0.48.0/go.mod h1:HzySONXnAgSmIQfL6gOv9hWprKJkx8CicuXuUbmgWfo= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.48.1 h1:5nE6N3JSs2IG3xzMthNFhXfOaXlrsdgqmJ73lndFf8c= +github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.48.1/go.mod h1:Vc+snp0Bey4MrrJyiV2tVxxJb6BmLomPvN1RgAvjGaQ= +github.com/DataDog/datadog-go/v5 v5.3.0 h1:2q2qjFOb3RwAZNU+ez27ZVDwErJv5/VpbBPprz7Z+s8= +github.com/DataDog/datadog-go/v5 v5.3.0/go.mod h1:XRDJk1pTc00gm+ZDiBKsjh7oOOtJfYfglVCmFb8C2+Q= +github.com/DataDog/go-libddwaf/v3 v3.2.1 h1:lZPc6UxCOwioHc++nsldKR50FpIrRh1uGnGLuryqnE8= +github.com/DataDog/go-libddwaf/v3 v3.2.1/go.mod h1:AP+7Atb8ftSsrha35wht7+K3R+xuzfVSQhabSO4w6CY= +github.com/DataDog/go-tuf v1.0.2-0.5.2 h1:EeZr937eKAWPxJ26IykAdWA4A0jQXJgkhUjqEI/w7+I= +github.com/DataDog/go-tuf v1.0.2-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= +github.com/DataDog/gostackparse v0.7.0 h1:i7dLkXHvYzHV308hnkvVGDL3BR4FWl7IsXNPz/IGQh4= +github.com/DataDog/gostackparse v0.7.0/go.mod h1:lTfqcJKqS9KnXQGnyQMCugq3u1FP6UZMfWR0aitKFMM= +github.com/DataDog/sketches-go v1.4.5 h1:ki7VfeNz7IcNafq7yI/j5U/YCkO3LJiMDtXz9OMQbyE= +github.com/DataDog/sketches-go v1.4.5/go.mod h1:7Y8GN8Jf66DLyDhc94zuWA3uHEt/7ttt8jHOBWWrSOg= +github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/btcsuite/btcd/btcec/v2 v2.2.1 h1:xP60mv8fvp+0khmrN0zTdPC3cNm24rfeE6lh2R/Yv3E= +github.com/btcsuite/btcd/btcec/v2 v2.2.1/go.mod h1:9/CSmJxmuvqzX9Wh2fXMWToLOHhPd11lSPuIupwTkI8= +github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= +github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= +github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4 h1:8EXxF+tCLqaVk8AOC29zl2mnhQjwyLxxOTuhUazWRsg= +github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4/go.mod h1:I5sHm0Y0T1u5YjlyqC5GVArM7aNZRUYtTjmJ8mPJFds= +github.com/ebitengine/purego v0.6.0-alpha.5 h1:EYID3JOAdmQ4SNZYJHu9V6IqOeRQDBYxqKAg9PyoHFY= +github.com/ebitengine/purego v0.6.0-alpha.5/go.mod h1:ah1In8AOtksoNK6yk5z1HTJeUkC1Ez4Wk2idgGslMwQ= +github.com/ethereum/go-ethereum v1.14.7 h1:EHpv3dE8evQmpVEQ/Ne2ahB06n2mQptdwqaMNhAT29g= +github.com/ethereum/go-ethereum v1.14.7/go.mod h1:Mq0biU2jbdmKSZoqOj29017ygFrMnB5/Rifwp980W4o= +github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec+ruQ= +github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b h1:h9U78+dx9a4BKdQkBBos92HalKpaGKHrp+3Uo6yTodo= +github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 h1:CWyXh/jylQWp2dtiV33mY4iSSp6yf4lmn+c7/tN+ObI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0/go.mod h1:nCLIt0w3Ept2NwF8ThLmrppXsfT07oC8k0XNDxd8sVU= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 h1:UpiO20jno/eV1eVZcxqWnUohyKRe1g8FPV/xH1s/2qs= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= +github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= +github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= +github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/holiman/uint256 v1.3.0 h1:4wdcm/tnd0xXdu7iS3ruNvxkWwrb4aeBQv19ayYn8F4= +github.com/holiman/uint256 v1.3.0/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= +github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/outcaste-io/ristretto v0.2.3 h1:AK4zt/fJ76kjlYObOeNwh4T3asEuaCmp26pOvUOL9w0= +github.com/outcaste-io/ristretto v0.2.3/go.mod h1:W8HywhmtlopSB1jeMg3JtdIhf+DYkLAr0VN/s4+MHac= +github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= +github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= +github.com/pires/go-proxyproto v0.7.0 h1:IukmRewDQFWC7kfnb66CSomk2q/seBuilHBYFwyq0Hs= +github.com/pires/go-proxyproto v0.7.0/go.mod h1:Vz/1JPY/OACxWGQNIRY2BeyDmpoaWmEP40O9LbuiFR4= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/richardartoul/molecule v1.0.1-0.20240531184615-7ca0df43c0b3 h1:4+LEVOB87y175cLJC/mbsgKmoDOjrBldtXvioEy96WY= +github.com/richardartoul/molecule v1.0.1-0.20240531184615-7ca0df43c0b3/go.mod h1:vl5+MqJ1nBINuSsUI2mGgH79UweUT/B5Fy8857PqyyI= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= +github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0= +github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f h1:b1Ln/PG8orm0SsBbHZWke8dDp2lrCD4jSmfglFpTZbk= +google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f/go.mod h1:AHT0dDg3SoMOgZGnZk29b5xTbPHMoEC8qthmBLJCpys= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a h1:hqK4+jJZXCU4pW7jsAdGOVFIfLHQeV7LaizZKnZ84HI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240723171418-e6d459c13d2a/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/DataDog/dd-trace-go.v1 v1.66.0 h1:025+lLubGtpiDWrRmSOxoFBPIiVRVYRcqP9oLabVOeg= +gopkg.in/DataDog/dd-trace-go.v1 v1.66.0/go.mod h1:Av6AXGmQCQAbDnwNoPiuUz1k3GS8TwQjj+vEdwmEpmM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/gotraceui v0.2.0 h1:dmNsfQ9Vl3GwbiVD7Z8d/osC6WtGGrasyrC2suc4ZIQ= +honnef.co/go/gotraceui v0.2.0/go.mod h1:qHo4/W75cA3bX0QQoSvDjbJa4R8mAyyFjbWAj63XElc= +modernc.org/libc v1.37.6 h1:orZH3c5wmhIQFTXF+Nt+eeauyd+ZIt2BX6ARe+kD+aw= +modernc.org/libc v1.37.6/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE= +modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= +modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= +modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= +modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E= +modernc.org/sqlite v1.28.0 h1:Zx+LyDDmXczNnEQdvPuEfcFVA2ZPyaD7UCZDjef3BHQ= +modernc.org/sqlite v1.28.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0= diff --git a/pkg/api/server.go b/pkg/api/server.go new file mode 100644 index 00000000..b60817c7 --- /dev/null +++ b/pkg/api/server.go @@ -0,0 +1,99 @@ +package api + +import ( + "context" + "fmt" + "net" + "strings" + "sync" + "time" + + "github.com/pires/go-proxyproto" + "github.com/xmtp/xmtpd/pkg/proto/xmtpv4/message_api" + "github.com/xmtp/xmtpd/pkg/tracing" + "go.uber.org/zap" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/health" + healthgrpc "google.golang.org/grpc/health/grpc_health_v1" + "google.golang.org/grpc/keepalive" +) + +type ApiServer struct { + log *zap.Logger + wg sync.WaitGroup + grpcListener net.Listener + ctx context.Context + service *message_api.ReplicationApiServer +} + +func NewAPIServer(ctx context.Context, log *zap.Logger, port int) (*ApiServer, error) { + grpcListener, err := net.Listen("tcp", fmt.Sprintf("0.0.0.0:%d", port)) + + if err != nil { + return nil, err + } + s := &ApiServer{ + log: log.Named("api"), + ctx: ctx, + wg: sync.WaitGroup{}, + grpcListener: &proxyproto.Listener{Listener: grpcListener, ReadHeaderTimeout: 10 * time.Second}, + } + + // TODO: Add interceptors + + options := []grpc.ServerOption{ + grpc.Creds(insecure.NewCredentials()), + grpc.KeepaliveParams(keepalive.ServerParameters{ + Time: 5 * time.Minute, + }), + grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{ + PermitWithoutStream: true, + MinTime: 15 * time.Second, + }), + // grpc.MaxRecvMsgSize(s.Config.Options.MaxMsgSize), + } + grpcServer := grpc.NewServer(options...) + + healthcheck := health.NewServer() + healthgrpc.RegisterHealthServer(grpcServer, healthcheck) + + replicationService, err := NewReplicationApiService(ctx, log) + if err != nil { + return nil, err + } + s.service = &replicationService + + tracing.GoPanicWrap(s.ctx, &s.wg, "grpc", func(ctx context.Context) { + s.log.Info("serving grpc", zap.String("address", s.grpcListener.Addr().String())) + err := grpcServer.Serve(s.grpcListener) + if err != nil && !isErrUseOfClosedConnection(err) { + s.log.Error("serving grpc", zap.Error(err)) + } + }) + + return s, nil +} + +func (s *ApiServer) Addr() net.Addr { + return s.grpcListener.Addr() +} + +func (s *ApiServer) Close() { + s.log.Info("closing") + + if s.grpcListener != nil { + err := s.grpcListener.Close() + if err != nil { + s.log.Error("closing grpc listener", zap.Error(err)) + } + s.grpcListener = nil + } + + s.wg.Wait() + s.log.Info("closed") +} + +func isErrUseOfClosedConnection(err error) bool { + return strings.Contains(err.Error(), "use of closed network connection") +} diff --git a/pkg/api/service.go b/pkg/api/service.go new file mode 100644 index 00000000..301361e4 --- /dev/null +++ b/pkg/api/service.go @@ -0,0 +1,30 @@ +package api + +import ( + "context" + + "github.com/xmtp/xmtpd/pkg/proto/xmtpv4/message_api" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "go.uber.org/zap" +) + +type Service struct { + message_api.UnimplementedReplicationApiServer + + ctx context.Context + log *zap.Logger +} + +func NewReplicationApiService(ctx context.Context, log *zap.Logger) (message_api.ReplicationApiServer, error) { + return &Service{ctx: ctx, log: log}, nil +} + +func (s *Service) SubscribeEnvelopes(req *message_api.BatchSubscribeEnvelopesRequest, server message_api.ReplicationApi_SubscribeEnvelopesServer) error { + return status.Errorf(codes.Unimplemented, "method SubscribeEnvelopes not implemented") +} + +func (s *Service) QueryEnvelopes(ctx context.Context, req *message_api.QueryEnvelopesRequest) (*message_api.QueryEnvelopesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryEnvelopes not implemented") +} diff --git a/pkg/proto/identity/api/v1/identity.pb.go b/pkg/proto/identity/api/v1/identity.pb.go new file mode 100644 index 00000000..ec429166 --- /dev/null +++ b/pkg/proto/identity/api/v1/identity.pb.go @@ -0,0 +1,925 @@ +// Message API + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: identity/api/v1/identity.proto + +package apiv1 + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + associations "github.com/xmtp/xmtpd/pkg/proto/identity/associations" + _ "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) +) + +// Publishes an identity update to the network +type PublishIdentityUpdateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IdentityUpdate *associations.IdentityUpdate `protobuf:"bytes,1,opt,name=identity_update,json=identityUpdate,proto3" json:"identity_update,omitempty"` +} + +func (x *PublishIdentityUpdateRequest) Reset() { + *x = PublishIdentityUpdateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_api_v1_identity_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublishIdentityUpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishIdentityUpdateRequest) ProtoMessage() {} + +func (x *PublishIdentityUpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_identity_api_v1_identity_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 PublishIdentityUpdateRequest.ProtoReflect.Descriptor instead. +func (*PublishIdentityUpdateRequest) Descriptor() ([]byte, []int) { + return file_identity_api_v1_identity_proto_rawDescGZIP(), []int{0} +} + +func (x *PublishIdentityUpdateRequest) GetIdentityUpdate() *associations.IdentityUpdate { + if x != nil { + return x.IdentityUpdate + } + return nil +} + +// The response when an identity update is published +type PublishIdentityUpdateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PublishIdentityUpdateResponse) Reset() { + *x = PublishIdentityUpdateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_api_v1_identity_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublishIdentityUpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishIdentityUpdateResponse) ProtoMessage() {} + +func (x *PublishIdentityUpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_identity_api_v1_identity_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 PublishIdentityUpdateResponse.ProtoReflect.Descriptor instead. +func (*PublishIdentityUpdateResponse) Descriptor() ([]byte, []int) { + return file_identity_api_v1_identity_proto_rawDescGZIP(), []int{1} +} + +// Get all updates for an identity since the specified time +type GetIdentityUpdatesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Requests []*GetIdentityUpdatesRequest_Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *GetIdentityUpdatesRequest) Reset() { + *x = GetIdentityUpdatesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_api_v1_identity_proto_msgTypes[2] + 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_identity_api_v1_identity_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 GetIdentityUpdatesRequest.ProtoReflect.Descriptor instead. +func (*GetIdentityUpdatesRequest) Descriptor() ([]byte, []int) { + return file_identity_api_v1_identity_proto_rawDescGZIP(), []int{2} +} + +func (x *GetIdentityUpdatesRequest) GetRequests() []*GetIdentityUpdatesRequest_Request { + if x != nil { + return x.Requests + } + return nil +} + +// Returns all log entries for the requested identities +type GetIdentityUpdatesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*GetIdentityUpdatesResponse_Response `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *GetIdentityUpdatesResponse) Reset() { + *x = GetIdentityUpdatesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_api_v1_identity_proto_msgTypes[3] + 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_identity_api_v1_identity_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 GetIdentityUpdatesResponse.ProtoReflect.Descriptor instead. +func (*GetIdentityUpdatesResponse) Descriptor() ([]byte, []int) { + return file_identity_api_v1_identity_proto_rawDescGZIP(), []int{3} +} + +func (x *GetIdentityUpdatesResponse) GetResponses() []*GetIdentityUpdatesResponse_Response { + if x != nil { + return x.Responses + } + return nil +} + +// Request to retrieve the XIDs for the given addresses +type GetInboxIdsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Requests []*GetInboxIdsRequest_Request `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *GetInboxIdsRequest) Reset() { + *x = GetInboxIdsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_api_v1_identity_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetInboxIdsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInboxIdsRequest) ProtoMessage() {} + +func (x *GetInboxIdsRequest) ProtoReflect() protoreflect.Message { + mi := &file_identity_api_v1_identity_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 GetInboxIdsRequest.ProtoReflect.Descriptor instead. +func (*GetInboxIdsRequest) Descriptor() ([]byte, []int) { + return file_identity_api_v1_identity_proto_rawDescGZIP(), []int{4} +} + +func (x *GetInboxIdsRequest) GetRequests() []*GetInboxIdsRequest_Request { + if x != nil { + return x.Requests + } + return nil +} + +// Response with the XIDs for the requested addresses +type GetInboxIdsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*GetInboxIdsResponse_Response `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *GetInboxIdsResponse) Reset() { + *x = GetInboxIdsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_api_v1_identity_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetInboxIdsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInboxIdsResponse) ProtoMessage() {} + +func (x *GetInboxIdsResponse) ProtoReflect() protoreflect.Message { + mi := &file_identity_api_v1_identity_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 GetInboxIdsResponse.ProtoReflect.Descriptor instead. +func (*GetInboxIdsResponse) Descriptor() ([]byte, []int) { + return file_identity_api_v1_identity_proto_rawDescGZIP(), []int{5} +} + +func (x *GetInboxIdsResponse) GetResponses() []*GetInboxIdsResponse_Response { + if x != nil { + return x.Responses + } + return nil +} + +// Points to the last entry the client has received. The sequence_id should be +// set to 0 if the client has not received anything. +type GetIdentityUpdatesRequest_Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InboxId string `protobuf:"bytes,1,opt,name=inbox_id,json=inboxId,proto3" json:"inbox_id,omitempty"` + SequenceId uint64 `protobuf:"varint,2,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"` +} + +func (x *GetIdentityUpdatesRequest_Request) Reset() { + *x = GetIdentityUpdatesRequest_Request{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_api_v1_identity_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIdentityUpdatesRequest_Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIdentityUpdatesRequest_Request) ProtoMessage() {} + +func (x *GetIdentityUpdatesRequest_Request) ProtoReflect() protoreflect.Message { + mi := &file_identity_api_v1_identity_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 GetIdentityUpdatesRequest_Request.ProtoReflect.Descriptor instead. +func (*GetIdentityUpdatesRequest_Request) Descriptor() ([]byte, []int) { + return file_identity_api_v1_identity_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *GetIdentityUpdatesRequest_Request) GetInboxId() string { + if x != nil { + return x.InboxId + } + return "" +} + +func (x *GetIdentityUpdatesRequest_Request) GetSequenceId() uint64 { + if x != nil { + return x.SequenceId + } + return 0 +} + +// A single entry in the XID log on the server. +type GetIdentityUpdatesResponse_IdentityUpdateLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SequenceId uint64 `protobuf:"varint,1,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"` + ServerTimestampNs uint64 `protobuf:"varint,2,opt,name=server_timestamp_ns,json=serverTimestampNs,proto3" json:"server_timestamp_ns,omitempty"` + Update *associations.IdentityUpdate `protobuf:"bytes,3,opt,name=update,proto3" json:"update,omitempty"` +} + +func (x *GetIdentityUpdatesResponse_IdentityUpdateLog) Reset() { + *x = GetIdentityUpdatesResponse_IdentityUpdateLog{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_api_v1_identity_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIdentityUpdatesResponse_IdentityUpdateLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIdentityUpdatesResponse_IdentityUpdateLog) ProtoMessage() {} + +func (x *GetIdentityUpdatesResponse_IdentityUpdateLog) ProtoReflect() protoreflect.Message { + mi := &file_identity_api_v1_identity_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 GetIdentityUpdatesResponse_IdentityUpdateLog.ProtoReflect.Descriptor instead. +func (*GetIdentityUpdatesResponse_IdentityUpdateLog) Descriptor() ([]byte, []int) { + return file_identity_api_v1_identity_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *GetIdentityUpdatesResponse_IdentityUpdateLog) GetSequenceId() uint64 { + if x != nil { + return x.SequenceId + } + return 0 +} + +func (x *GetIdentityUpdatesResponse_IdentityUpdateLog) GetServerTimestampNs() uint64 { + if x != nil { + return x.ServerTimestampNs + } + return 0 +} + +func (x *GetIdentityUpdatesResponse_IdentityUpdateLog) GetUpdate() *associations.IdentityUpdate { + if x != nil { + return x.Update + } + return nil +} + +// The update log for a single identity, starting after the last cursor +type GetIdentityUpdatesResponse_Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InboxId string `protobuf:"bytes,1,opt,name=inbox_id,json=inboxId,proto3" json:"inbox_id,omitempty"` + Updates []*GetIdentityUpdatesResponse_IdentityUpdateLog `protobuf:"bytes,2,rep,name=updates,proto3" json:"updates,omitempty"` +} + +func (x *GetIdentityUpdatesResponse_Response) Reset() { + *x = GetIdentityUpdatesResponse_Response{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_api_v1_identity_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIdentityUpdatesResponse_Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIdentityUpdatesResponse_Response) ProtoMessage() {} + +func (x *GetIdentityUpdatesResponse_Response) ProtoReflect() protoreflect.Message { + mi := &file_identity_api_v1_identity_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 GetIdentityUpdatesResponse_Response.ProtoReflect.Descriptor instead. +func (*GetIdentityUpdatesResponse_Response) Descriptor() ([]byte, []int) { + return file_identity_api_v1_identity_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *GetIdentityUpdatesResponse_Response) GetInboxId() string { + if x != nil { + return x.InboxId + } + return "" +} + +func (x *GetIdentityUpdatesResponse_Response) GetUpdates() []*GetIdentityUpdatesResponse_IdentityUpdateLog { + if x != nil { + return x.Updates + } + return nil +} + +// A single request for a given address +type GetInboxIdsRequest_Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *GetInboxIdsRequest_Request) Reset() { + *x = GetInboxIdsRequest_Request{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_api_v1_identity_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetInboxIdsRequest_Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInboxIdsRequest_Request) ProtoMessage() {} + +func (x *GetInboxIdsRequest_Request) ProtoReflect() protoreflect.Message { + mi := &file_identity_api_v1_identity_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 GetInboxIdsRequest_Request.ProtoReflect.Descriptor instead. +func (*GetInboxIdsRequest_Request) Descriptor() ([]byte, []int) { + return file_identity_api_v1_identity_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *GetInboxIdsRequest_Request) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// A single response for a given address +type GetInboxIdsResponse_Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + InboxId *string `protobuf:"bytes,2,opt,name=inbox_id,json=inboxId,proto3,oneof" json:"inbox_id,omitempty"` +} + +func (x *GetInboxIdsResponse_Response) Reset() { + *x = GetInboxIdsResponse_Response{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_api_v1_identity_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetInboxIdsResponse_Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInboxIdsResponse_Response) ProtoMessage() {} + +func (x *GetInboxIdsResponse_Response) ProtoReflect() protoreflect.Message { + mi := &file_identity_api_v1_identity_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 GetInboxIdsResponse_Response.ProtoReflect.Descriptor instead. +func (*GetInboxIdsResponse_Response) Descriptor() ([]byte, []int) { + return file_identity_api_v1_identity_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *GetInboxIdsResponse_Response) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *GetInboxIdsResponse_Response) GetInboxId() string { + if x != nil && x.InboxId != nil { + return *x.InboxId + } + return "" +} + +var File_identity_api_v1_identity_proto protoreflect.FileDescriptor + +var file_identity_api_v1_identity_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x14, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 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, 0x27, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x61, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x73, 0x0a, + 0x1c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, + 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xb7, 0x01, 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, 0x53, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 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, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x1a, 0x45, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0a, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0xa6, 0x03, + 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, 0x57, 0x0a, 0x09, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x39, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x1a, 0xa8, 0x01, 0x0a, 0x11, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0a, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4e, 0x73, 0x12, 0x42, 0x0a, 0x06, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x1a, 0x83, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x5c, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 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, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x67, 0x52, 0x07, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x62, 0x6f, 0x78, 0x49, 0x64, 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, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, + 0x64, 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, 0x23, 0x0a, 0x07, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x22, 0xba, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 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, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 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, 0x51, 0x0a, 0x08, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x1e, 0x0a, 0x08, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x88, 0x01, 0x01, + 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x32, 0xf5, 0x03, + 0x0a, 0x0b, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x70, 0x69, 0x12, 0xb1, 0x01, + 0x0a, 0x15, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x32, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x2d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x12, 0xa5, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 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, 0x30, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 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, 0x2c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x22, 0x21, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 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, 0x89, 0x01, 0x0a, 0x0b, 0x47, 0x65, + 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x73, 0x12, 0x28, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x62, 0x6f, 0x78, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x74, 0x2d, 0x69, 0x6e, 0x62, 0x6f, + 0x78, 0x2d, 0x69, 0x64, 0x73, 0x42, 0xea, 0x01, 0x92, 0x41, 0x14, 0x12, 0x12, 0x0a, 0x0b, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x70, 0x69, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x0a, + 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, + 0x64, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x58, 0x49, 0x41, 0xaa, 0x02, 0x14, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x14, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5c, 0x41, + 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x20, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x58, 0x6d, 0x74, 0x70, 0x3a, + 0x3a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_identity_api_v1_identity_proto_rawDescOnce sync.Once + file_identity_api_v1_identity_proto_rawDescData = file_identity_api_v1_identity_proto_rawDesc +) + +func file_identity_api_v1_identity_proto_rawDescGZIP() []byte { + file_identity_api_v1_identity_proto_rawDescOnce.Do(func() { + file_identity_api_v1_identity_proto_rawDescData = protoimpl.X.CompressGZIP(file_identity_api_v1_identity_proto_rawDescData) + }) + return file_identity_api_v1_identity_proto_rawDescData +} + +var file_identity_api_v1_identity_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_identity_api_v1_identity_proto_goTypes = []any{ + (*PublishIdentityUpdateRequest)(nil), // 0: xmtp.identity.api.v1.PublishIdentityUpdateRequest + (*PublishIdentityUpdateResponse)(nil), // 1: xmtp.identity.api.v1.PublishIdentityUpdateResponse + (*GetIdentityUpdatesRequest)(nil), // 2: xmtp.identity.api.v1.GetIdentityUpdatesRequest + (*GetIdentityUpdatesResponse)(nil), // 3: xmtp.identity.api.v1.GetIdentityUpdatesResponse + (*GetInboxIdsRequest)(nil), // 4: xmtp.identity.api.v1.GetInboxIdsRequest + (*GetInboxIdsResponse)(nil), // 5: xmtp.identity.api.v1.GetInboxIdsResponse + (*GetIdentityUpdatesRequest_Request)(nil), // 6: xmtp.identity.api.v1.GetIdentityUpdatesRequest.Request + (*GetIdentityUpdatesResponse_IdentityUpdateLog)(nil), // 7: xmtp.identity.api.v1.GetIdentityUpdatesResponse.IdentityUpdateLog + (*GetIdentityUpdatesResponse_Response)(nil), // 8: xmtp.identity.api.v1.GetIdentityUpdatesResponse.Response + (*GetInboxIdsRequest_Request)(nil), // 9: xmtp.identity.api.v1.GetInboxIdsRequest.Request + (*GetInboxIdsResponse_Response)(nil), // 10: xmtp.identity.api.v1.GetInboxIdsResponse.Response + (*associations.IdentityUpdate)(nil), // 11: xmtp.identity.associations.IdentityUpdate +} +var file_identity_api_v1_identity_proto_depIdxs = []int32{ + 11, // 0: xmtp.identity.api.v1.PublishIdentityUpdateRequest.identity_update:type_name -> xmtp.identity.associations.IdentityUpdate + 6, // 1: xmtp.identity.api.v1.GetIdentityUpdatesRequest.requests:type_name -> xmtp.identity.api.v1.GetIdentityUpdatesRequest.Request + 8, // 2: xmtp.identity.api.v1.GetIdentityUpdatesResponse.responses:type_name -> xmtp.identity.api.v1.GetIdentityUpdatesResponse.Response + 9, // 3: xmtp.identity.api.v1.GetInboxIdsRequest.requests:type_name -> xmtp.identity.api.v1.GetInboxIdsRequest.Request + 10, // 4: xmtp.identity.api.v1.GetInboxIdsResponse.responses:type_name -> xmtp.identity.api.v1.GetInboxIdsResponse.Response + 11, // 5: xmtp.identity.api.v1.GetIdentityUpdatesResponse.IdentityUpdateLog.update:type_name -> xmtp.identity.associations.IdentityUpdate + 7, // 6: xmtp.identity.api.v1.GetIdentityUpdatesResponse.Response.updates:type_name -> xmtp.identity.api.v1.GetIdentityUpdatesResponse.IdentityUpdateLog + 0, // 7: xmtp.identity.api.v1.IdentityApi.PublishIdentityUpdate:input_type -> xmtp.identity.api.v1.PublishIdentityUpdateRequest + 2, // 8: xmtp.identity.api.v1.IdentityApi.GetIdentityUpdates:input_type -> xmtp.identity.api.v1.GetIdentityUpdatesRequest + 4, // 9: xmtp.identity.api.v1.IdentityApi.GetInboxIds:input_type -> xmtp.identity.api.v1.GetInboxIdsRequest + 1, // 10: xmtp.identity.api.v1.IdentityApi.PublishIdentityUpdate:output_type -> xmtp.identity.api.v1.PublishIdentityUpdateResponse + 3, // 11: xmtp.identity.api.v1.IdentityApi.GetIdentityUpdates:output_type -> xmtp.identity.api.v1.GetIdentityUpdatesResponse + 5, // 12: xmtp.identity.api.v1.IdentityApi.GetInboxIds:output_type -> xmtp.identity.api.v1.GetInboxIdsResponse + 10, // [10:13] is the sub-list for method output_type + 7, // [7:10] 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_identity_api_v1_identity_proto_init() } +func file_identity_api_v1_identity_proto_init() { + if File_identity_api_v1_identity_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_identity_api_v1_identity_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*PublishIdentityUpdateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_api_v1_identity_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*PublishIdentityUpdateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_api_v1_identity_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetIdentityUpdatesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_api_v1_identity_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetIdentityUpdatesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_api_v1_identity_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetInboxIdsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_api_v1_identity_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*GetInboxIdsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_api_v1_identity_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*GetIdentityUpdatesRequest_Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_api_v1_identity_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*GetIdentityUpdatesResponse_IdentityUpdateLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_api_v1_identity_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*GetIdentityUpdatesResponse_Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_api_v1_identity_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*GetInboxIdsRequest_Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_api_v1_identity_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*GetInboxIdsResponse_Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_identity_api_v1_identity_proto_msgTypes[10].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_identity_api_v1_identity_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_identity_api_v1_identity_proto_goTypes, + DependencyIndexes: file_identity_api_v1_identity_proto_depIdxs, + MessageInfos: file_identity_api_v1_identity_proto_msgTypes, + }.Build() + File_identity_api_v1_identity_proto = out.File + file_identity_api_v1_identity_proto_rawDesc = nil + file_identity_api_v1_identity_proto_goTypes = nil + file_identity_api_v1_identity_proto_depIdxs = nil +} diff --git a/pkg/proto/identity/api/v1/identity.pb.gw.go b/pkg/proto/identity/api/v1/identity.pb.gw.go new file mode 100644 index 00000000..260c31ae --- /dev/null +++ b/pkg/proto/identity/api/v1/identity.pb.gw.go @@ -0,0 +1,317 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: identity/api/v1/identity.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_IdentityApi_PublishIdentityUpdate_0(ctx context.Context, marshaler runtime.Marshaler, client IdentityApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PublishIdentityUpdateRequest + 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.PublishIdentityUpdate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_IdentityApi_PublishIdentityUpdate_0(ctx context.Context, marshaler runtime.Marshaler, server IdentityApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PublishIdentityUpdateRequest + 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.PublishIdentityUpdate(ctx, &protoReq) + return msg, metadata, err + +} + +func request_IdentityApi_GetIdentityUpdates_0(ctx context.Context, marshaler runtime.Marshaler, client IdentityApiClient, 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_IdentityApi_GetIdentityUpdates_0(ctx context.Context, marshaler runtime.Marshaler, server IdentityApiServer, 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_IdentityApi_GetInboxIds_0(ctx context.Context, marshaler runtime.Marshaler, client IdentityApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetInboxIdsRequest + 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.GetInboxIds(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_IdentityApi_GetInboxIds_0(ctx context.Context, marshaler runtime.Marshaler, server IdentityApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetInboxIdsRequest + 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.GetInboxIds(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterIdentityApiHandlerServer registers the http handlers for service IdentityApi to "mux". +// UnaryRPC :call IdentityApiServer 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 RegisterIdentityApiHandlerFromEndpoint instead. +func RegisterIdentityApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server IdentityApiServer) error { + + mux.Handle("POST", pattern_IdentityApi_PublishIdentityUpdate_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.identity.api.v1.IdentityApi/PublishIdentityUpdate", runtime.WithHTTPPathPattern("/identity/v1/publish-identity-update")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_IdentityApi_PublishIdentityUpdate_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_IdentityApi_PublishIdentityUpdate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_IdentityApi_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.identity.api.v1.IdentityApi/GetIdentityUpdates", runtime.WithHTTPPathPattern("/identity/v1/get-identity-updates")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_IdentityApi_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_IdentityApi_GetIdentityUpdates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_IdentityApi_GetInboxIds_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.identity.api.v1.IdentityApi/GetInboxIds", runtime.WithHTTPPathPattern("/identity/v1/get-inbox-ids")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_IdentityApi_GetInboxIds_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_IdentityApi_GetInboxIds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterIdentityApiHandlerFromEndpoint is same as RegisterIdentityApiHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterIdentityApiHandlerFromEndpoint(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 RegisterIdentityApiHandler(ctx, mux, conn) +} + +// RegisterIdentityApiHandler registers the http handlers for service IdentityApi to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterIdentityApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterIdentityApiHandlerClient(ctx, mux, NewIdentityApiClient(conn)) +} + +// RegisterIdentityApiHandlerClient registers the http handlers for service IdentityApi +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "IdentityApiClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "IdentityApiClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "IdentityApiClient" to call the correct interceptors. +func RegisterIdentityApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client IdentityApiClient) error { + + mux.Handle("POST", pattern_IdentityApi_PublishIdentityUpdate_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.identity.api.v1.IdentityApi/PublishIdentityUpdate", runtime.WithHTTPPathPattern("/identity/v1/publish-identity-update")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_IdentityApi_PublishIdentityUpdate_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_IdentityApi_PublishIdentityUpdate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_IdentityApi_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.identity.api.v1.IdentityApi/GetIdentityUpdates", runtime.WithHTTPPathPattern("/identity/v1/get-identity-updates")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_IdentityApi_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_IdentityApi_GetIdentityUpdates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_IdentityApi_GetInboxIds_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.identity.api.v1.IdentityApi/GetInboxIds", runtime.WithHTTPPathPattern("/identity/v1/get-inbox-ids")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_IdentityApi_GetInboxIds_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_IdentityApi_GetInboxIds_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_IdentityApi_PublishIdentityUpdate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"identity", "v1", "publish-identity-update"}, "")) + + pattern_IdentityApi_GetIdentityUpdates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"identity", "v1", "get-identity-updates"}, "")) + + pattern_IdentityApi_GetInboxIds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"identity", "v1", "get-inbox-ids"}, "")) +) + +var ( + forward_IdentityApi_PublishIdentityUpdate_0 = runtime.ForwardResponseMessage + + forward_IdentityApi_GetIdentityUpdates_0 = runtime.ForwardResponseMessage + + forward_IdentityApi_GetInboxIds_0 = runtime.ForwardResponseMessage +) diff --git a/pkg/proto/identity/api/v1/identity_grpc.pb.go b/pkg/proto/identity/api/v1/identity_grpc.pb.go new file mode 100644 index 00000000..de4b00a8 --- /dev/null +++ b/pkg/proto/identity/api/v1/identity_grpc.pb.go @@ -0,0 +1,197 @@ +// Message API + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: identity/api/v1/identity.proto + +package 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 ( + IdentityApi_PublishIdentityUpdate_FullMethodName = "/xmtp.identity.api.v1.IdentityApi/PublishIdentityUpdate" + IdentityApi_GetIdentityUpdates_FullMethodName = "/xmtp.identity.api.v1.IdentityApi/GetIdentityUpdates" + IdentityApi_GetInboxIds_FullMethodName = "/xmtp.identity.api.v1.IdentityApi/GetInboxIds" +) + +// IdentityApiClient is the client API for IdentityApi 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 IdentityApiClient interface { + // Publishes an identity update for an XID or wallet. An identity update may + // consist of multiple identity actions that have been batch signed. + PublishIdentityUpdate(ctx context.Context, in *PublishIdentityUpdateRequest, opts ...grpc.CallOption) (*PublishIdentityUpdateResponse, 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) + // Retrieve the XIDs for the given addresses + GetInboxIds(ctx context.Context, in *GetInboxIdsRequest, opts ...grpc.CallOption) (*GetInboxIdsResponse, error) +} + +type identityApiClient struct { + cc grpc.ClientConnInterface +} + +func NewIdentityApiClient(cc grpc.ClientConnInterface) IdentityApiClient { + return &identityApiClient{cc} +} + +func (c *identityApiClient) PublishIdentityUpdate(ctx context.Context, in *PublishIdentityUpdateRequest, opts ...grpc.CallOption) (*PublishIdentityUpdateResponse, error) { + out := new(PublishIdentityUpdateResponse) + err := c.cc.Invoke(ctx, IdentityApi_PublishIdentityUpdate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityApiClient) GetIdentityUpdates(ctx context.Context, in *GetIdentityUpdatesRequest, opts ...grpc.CallOption) (*GetIdentityUpdatesResponse, error) { + out := new(GetIdentityUpdatesResponse) + err := c.cc.Invoke(ctx, IdentityApi_GetIdentityUpdates_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityApiClient) GetInboxIds(ctx context.Context, in *GetInboxIdsRequest, opts ...grpc.CallOption) (*GetInboxIdsResponse, error) { + out := new(GetInboxIdsResponse) + err := c.cc.Invoke(ctx, IdentityApi_GetInboxIds_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// IdentityApiServer is the server API for IdentityApi service. +// All implementations must embed UnimplementedIdentityApiServer +// for forward compatibility +type IdentityApiServer interface { + // Publishes an identity update for an XID or wallet. An identity update may + // consist of multiple identity actions that have been batch signed. + PublishIdentityUpdate(context.Context, *PublishIdentityUpdateRequest) (*PublishIdentityUpdateResponse, 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) + // Retrieve the XIDs for the given addresses + GetInboxIds(context.Context, *GetInboxIdsRequest) (*GetInboxIdsResponse, error) + mustEmbedUnimplementedIdentityApiServer() +} + +// UnimplementedIdentityApiServer must be embedded to have forward compatible implementations. +type UnimplementedIdentityApiServer struct { +} + +func (UnimplementedIdentityApiServer) PublishIdentityUpdate(context.Context, *PublishIdentityUpdateRequest) (*PublishIdentityUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PublishIdentityUpdate not implemented") +} +func (UnimplementedIdentityApiServer) GetIdentityUpdates(context.Context, *GetIdentityUpdatesRequest) (*GetIdentityUpdatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIdentityUpdates not implemented") +} +func (UnimplementedIdentityApiServer) GetInboxIds(context.Context, *GetInboxIdsRequest) (*GetInboxIdsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetInboxIds not implemented") +} +func (UnimplementedIdentityApiServer) mustEmbedUnimplementedIdentityApiServer() {} + +// UnsafeIdentityApiServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to IdentityApiServer will +// result in compilation errors. +type UnsafeIdentityApiServer interface { + mustEmbedUnimplementedIdentityApiServer() +} + +func RegisterIdentityApiServer(s grpc.ServiceRegistrar, srv IdentityApiServer) { + s.RegisterService(&IdentityApi_ServiceDesc, srv) +} + +func _IdentityApi_PublishIdentityUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PublishIdentityUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityApiServer).PublishIdentityUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityApi_PublishIdentityUpdate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityApiServer).PublishIdentityUpdate(ctx, req.(*PublishIdentityUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IdentityApi_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.(IdentityApiServer).GetIdentityUpdates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityApi_GetIdentityUpdates_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityApiServer).GetIdentityUpdates(ctx, req.(*GetIdentityUpdatesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IdentityApi_GetInboxIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetInboxIdsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityApiServer).GetInboxIds(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityApi_GetInboxIds_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityApiServer).GetInboxIds(ctx, req.(*GetInboxIdsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// IdentityApi_ServiceDesc is the grpc.ServiceDesc for IdentityApi service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var IdentityApi_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "xmtp.identity.api.v1.IdentityApi", + HandlerType: (*IdentityApiServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PublishIdentityUpdate", + Handler: _IdentityApi_PublishIdentityUpdate_Handler, + }, + { + MethodName: "GetIdentityUpdates", + Handler: _IdentityApi_GetIdentityUpdates_Handler, + }, + { + MethodName: "GetInboxIds", + Handler: _IdentityApi_GetInboxIds_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "identity/api/v1/identity.proto", +} diff --git a/pkg/proto/identity/associations/association.pb.go b/pkg/proto/identity/associations/association.pb.go new file mode 100644 index 00000000..74ab46fe --- /dev/null +++ b/pkg/proto/identity/associations/association.pb.go @@ -0,0 +1,1166 @@ +// Payloads to be signed for identity associations + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: identity/associations/association.proto + +package associations + +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 identifier for a member of an XID +type MemberIdentifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Kind: + // + // *MemberIdentifier_Address + // *MemberIdentifier_InstallationPublicKey + Kind isMemberIdentifier_Kind `protobuf_oneof:"kind"` +} + +func (x *MemberIdentifier) Reset() { + *x = MemberIdentifier{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_association_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MemberIdentifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemberIdentifier) ProtoMessage() {} + +func (x *MemberIdentifier) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_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 MemberIdentifier.ProtoReflect.Descriptor instead. +func (*MemberIdentifier) Descriptor() ([]byte, []int) { + return file_identity_associations_association_proto_rawDescGZIP(), []int{0} +} + +func (m *MemberIdentifier) GetKind() isMemberIdentifier_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (x *MemberIdentifier) GetAddress() string { + if x, ok := x.GetKind().(*MemberIdentifier_Address); ok { + return x.Address + } + return "" +} + +func (x *MemberIdentifier) GetInstallationPublicKey() []byte { + if x, ok := x.GetKind().(*MemberIdentifier_InstallationPublicKey); ok { + return x.InstallationPublicKey + } + return nil +} + +type isMemberIdentifier_Kind interface { + isMemberIdentifier_Kind() +} + +type MemberIdentifier_Address struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3,oneof"` +} + +type MemberIdentifier_InstallationPublicKey struct { + InstallationPublicKey []byte `protobuf:"bytes,2,opt,name=installation_public_key,json=installationPublicKey,proto3,oneof"` +} + +func (*MemberIdentifier_Address) isMemberIdentifier_Kind() {} + +func (*MemberIdentifier_InstallationPublicKey) isMemberIdentifier_Kind() {} + +// single member that optionally indicates the member that added them +type Member struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Identifier *MemberIdentifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + AddedByEntity *MemberIdentifier `protobuf:"bytes,2,opt,name=added_by_entity,json=addedByEntity,proto3,oneof" json:"added_by_entity,omitempty"` +} + +func (x *Member) Reset() { + *x = Member{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_association_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Member) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Member) ProtoMessage() {} + +func (x *Member) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_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 Member.ProtoReflect.Descriptor instead. +func (*Member) Descriptor() ([]byte, []int) { + return file_identity_associations_association_proto_rawDescGZIP(), []int{1} +} + +func (x *Member) GetIdentifier() *MemberIdentifier { + if x != nil { + return x.Identifier + } + return nil +} + +func (x *Member) GetAddedByEntity() *MemberIdentifier { + if x != nil { + return x.AddedByEntity + } + return nil +} + +// The first entry of any XID log. The XID must be deterministically derivable +// from the address and nonce. +// The recovery address defaults to the initial associated_address unless +// there is a subsequent ChangeRecoveryAddress in the log. +type CreateInbox struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InitialAddress string `protobuf:"bytes,1,opt,name=initial_address,json=initialAddress,proto3" json:"initial_address,omitempty"` + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + InitialAddressSignature *Signature `protobuf:"bytes,3,opt,name=initial_address_signature,json=initialAddressSignature,proto3" json:"initial_address_signature,omitempty"` // Must be an addressable member +} + +func (x *CreateInbox) Reset() { + *x = CreateInbox{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_association_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateInbox) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateInbox) ProtoMessage() {} + +func (x *CreateInbox) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_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 CreateInbox.ProtoReflect.Descriptor instead. +func (*CreateInbox) Descriptor() ([]byte, []int) { + return file_identity_associations_association_proto_rawDescGZIP(), []int{2} +} + +func (x *CreateInbox) GetInitialAddress() string { + if x != nil { + return x.InitialAddress + } + return "" +} + +func (x *CreateInbox) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *CreateInbox) GetInitialAddressSignature() *Signature { + if x != nil { + return x.InitialAddressSignature + } + return nil +} + +// Adds a new member for an XID - either an addressable member such as a +// wallet, or an installation acting on behalf of an address. +// A key-pair that has been associated with one role MUST not be permitted to be +// associated with a different role. +type AddAssociation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NewMemberIdentifier *MemberIdentifier `protobuf:"bytes,1,opt,name=new_member_identifier,json=newMemberIdentifier,proto3" json:"new_member_identifier,omitempty"` + ExistingMemberSignature *Signature `protobuf:"bytes,2,opt,name=existing_member_signature,json=existingMemberSignature,proto3" json:"existing_member_signature,omitempty"` + NewMemberSignature *Signature `protobuf:"bytes,3,opt,name=new_member_signature,json=newMemberSignature,proto3" json:"new_member_signature,omitempty"` +} + +func (x *AddAssociation) Reset() { + *x = AddAssociation{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_association_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddAssociation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddAssociation) ProtoMessage() {} + +func (x *AddAssociation) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_association_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 AddAssociation.ProtoReflect.Descriptor instead. +func (*AddAssociation) Descriptor() ([]byte, []int) { + return file_identity_associations_association_proto_rawDescGZIP(), []int{3} +} + +func (x *AddAssociation) GetNewMemberIdentifier() *MemberIdentifier { + if x != nil { + return x.NewMemberIdentifier + } + return nil +} + +func (x *AddAssociation) GetExistingMemberSignature() *Signature { + if x != nil { + return x.ExistingMemberSignature + } + return nil +} + +func (x *AddAssociation) GetNewMemberSignature() *Signature { + if x != nil { + return x.NewMemberSignature + } + return nil +} + +// Revokes a member from an XID. The recovery address must sign the revocation. +type RevokeAssociation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MemberToRevoke *MemberIdentifier `protobuf:"bytes,1,opt,name=member_to_revoke,json=memberToRevoke,proto3" json:"member_to_revoke,omitempty"` + RecoveryAddressSignature *Signature `protobuf:"bytes,2,opt,name=recovery_address_signature,json=recoveryAddressSignature,proto3" json:"recovery_address_signature,omitempty"` +} + +func (x *RevokeAssociation) Reset() { + *x = RevokeAssociation{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_association_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RevokeAssociation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeAssociation) ProtoMessage() {} + +func (x *RevokeAssociation) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_association_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 RevokeAssociation.ProtoReflect.Descriptor instead. +func (*RevokeAssociation) Descriptor() ([]byte, []int) { + return file_identity_associations_association_proto_rawDescGZIP(), []int{4} +} + +func (x *RevokeAssociation) GetMemberToRevoke() *MemberIdentifier { + if x != nil { + return x.MemberToRevoke + } + return nil +} + +func (x *RevokeAssociation) GetRecoveryAddressSignature() *Signature { + if x != nil { + return x.RecoveryAddressSignature + } + return nil +} + +// Changes the recovery address for an XID. The recovery address is not required +// to be a member of the XID. In addition to being able to add members, the +// recovery address can also revoke members. +type ChangeRecoveryAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NewRecoveryAddress string `protobuf:"bytes,1,opt,name=new_recovery_address,json=newRecoveryAddress,proto3" json:"new_recovery_address,omitempty"` + ExistingRecoveryAddressSignature *Signature `protobuf:"bytes,2,opt,name=existing_recovery_address_signature,json=existingRecoveryAddressSignature,proto3" json:"existing_recovery_address_signature,omitempty"` +} + +func (x *ChangeRecoveryAddress) Reset() { + *x = ChangeRecoveryAddress{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_association_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeRecoveryAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeRecoveryAddress) ProtoMessage() {} + +func (x *ChangeRecoveryAddress) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_association_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 ChangeRecoveryAddress.ProtoReflect.Descriptor instead. +func (*ChangeRecoveryAddress) Descriptor() ([]byte, []int) { + return file_identity_associations_association_proto_rawDescGZIP(), []int{5} +} + +func (x *ChangeRecoveryAddress) GetNewRecoveryAddress() string { + if x != nil { + return x.NewRecoveryAddress + } + return "" +} + +func (x *ChangeRecoveryAddress) GetExistingRecoveryAddressSignature() *Signature { + if x != nil { + return x.ExistingRecoveryAddressSignature + } + return nil +} + +// A single identity operation +type IdentityAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Kind: + // + // *IdentityAction_CreateInbox + // *IdentityAction_Add + // *IdentityAction_Revoke + // *IdentityAction_ChangeRecoveryAddress + Kind isIdentityAction_Kind `protobuf_oneof:"kind"` +} + +func (x *IdentityAction) Reset() { + *x = IdentityAction{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_association_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IdentityAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdentityAction) ProtoMessage() {} + +func (x *IdentityAction) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_association_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 IdentityAction.ProtoReflect.Descriptor instead. +func (*IdentityAction) Descriptor() ([]byte, []int) { + return file_identity_associations_association_proto_rawDescGZIP(), []int{6} +} + +func (m *IdentityAction) GetKind() isIdentityAction_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (x *IdentityAction) GetCreateInbox() *CreateInbox { + if x, ok := x.GetKind().(*IdentityAction_CreateInbox); ok { + return x.CreateInbox + } + return nil +} + +func (x *IdentityAction) GetAdd() *AddAssociation { + if x, ok := x.GetKind().(*IdentityAction_Add); ok { + return x.Add + } + return nil +} + +func (x *IdentityAction) GetRevoke() *RevokeAssociation { + if x, ok := x.GetKind().(*IdentityAction_Revoke); ok { + return x.Revoke + } + return nil +} + +func (x *IdentityAction) GetChangeRecoveryAddress() *ChangeRecoveryAddress { + if x, ok := x.GetKind().(*IdentityAction_ChangeRecoveryAddress); ok { + return x.ChangeRecoveryAddress + } + return nil +} + +type isIdentityAction_Kind interface { + isIdentityAction_Kind() +} + +type IdentityAction_CreateInbox struct { + CreateInbox *CreateInbox `protobuf:"bytes,1,opt,name=create_inbox,json=createInbox,proto3,oneof"` +} + +type IdentityAction_Add struct { + Add *AddAssociation `protobuf:"bytes,2,opt,name=add,proto3,oneof"` +} + +type IdentityAction_Revoke struct { + Revoke *RevokeAssociation `protobuf:"bytes,3,opt,name=revoke,proto3,oneof"` +} + +type IdentityAction_ChangeRecoveryAddress struct { + ChangeRecoveryAddress *ChangeRecoveryAddress `protobuf:"bytes,4,opt,name=change_recovery_address,json=changeRecoveryAddress,proto3,oneof"` +} + +func (*IdentityAction_CreateInbox) isIdentityAction_Kind() {} + +func (*IdentityAction_Add) isIdentityAction_Kind() {} + +func (*IdentityAction_Revoke) isIdentityAction_Kind() {} + +func (*IdentityAction_ChangeRecoveryAddress) isIdentityAction_Kind() {} + +// One or more identity actions that were signed together. +// Example: [CreateXid, AddAssociation, ChangeRecoveryAddress] +// 1. The batched signature text is created by concatenating the signature text +// of each association together with a separator, '\n\n\n'. +// 2. The user signs this concatenated result. +// 3. The resulting signature is added to each association proto where relevant. +// The same signature may be used for multiple associations in the array. +type IdentityUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Actions []*IdentityAction `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` + ClientTimestampNs uint64 `protobuf:"varint,2,opt,name=client_timestamp_ns,json=clientTimestampNs,proto3" json:"client_timestamp_ns,omitempty"` + InboxId string `protobuf:"bytes,3,opt,name=inbox_id,json=inboxId,proto3" json:"inbox_id,omitempty"` +} + +func (x *IdentityUpdate) Reset() { + *x = IdentityUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_association_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IdentityUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdentityUpdate) ProtoMessage() {} + +func (x *IdentityUpdate) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_association_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 IdentityUpdate.ProtoReflect.Descriptor instead. +func (*IdentityUpdate) Descriptor() ([]byte, []int) { + return file_identity_associations_association_proto_rawDescGZIP(), []int{7} +} + +func (x *IdentityUpdate) GetActions() []*IdentityAction { + if x != nil { + return x.Actions + } + return nil +} + +func (x *IdentityUpdate) GetClientTimestampNs() uint64 { + if x != nil { + return x.ClientTimestampNs + } + return 0 +} + +func (x *IdentityUpdate) GetInboxId() string { + if x != nil { + return x.InboxId + } + return "" +} + +// Map of members belonging to an inbox_id +type MemberMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *MemberIdentifier `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value *Member `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *MemberMap) Reset() { + *x = MemberMap{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_association_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MemberMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemberMap) ProtoMessage() {} + +func (x *MemberMap) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_association_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 MemberMap.ProtoReflect.Descriptor instead. +func (*MemberMap) Descriptor() ([]byte, []int) { + return file_identity_associations_association_proto_rawDescGZIP(), []int{8} +} + +func (x *MemberMap) GetKey() *MemberIdentifier { + if x != nil { + return x.Key + } + return nil +} + +func (x *MemberMap) GetValue() *Member { + if x != nil { + return x.Value + } + return nil +} + +// A final association state resulting from multiple `IdentityUpdates` +type AssociationState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InboxId string `protobuf:"bytes,1,opt,name=inbox_id,json=inboxId,proto3" json:"inbox_id,omitempty"` + Members []*MemberMap `protobuf:"bytes,2,rep,name=members,proto3" json:"members,omitempty"` + RecoveryAddress string `protobuf:"bytes,3,opt,name=recovery_address,json=recoveryAddress,proto3" json:"recovery_address,omitempty"` + SeenSignatures [][]byte `protobuf:"bytes,4,rep,name=seen_signatures,json=seenSignatures,proto3" json:"seen_signatures,omitempty"` +} + +func (x *AssociationState) Reset() { + *x = AssociationState{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_association_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssociationState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssociationState) ProtoMessage() {} + +func (x *AssociationState) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_association_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 AssociationState.ProtoReflect.Descriptor instead. +func (*AssociationState) Descriptor() ([]byte, []int) { + return file_identity_associations_association_proto_rawDescGZIP(), []int{9} +} + +func (x *AssociationState) GetInboxId() string { + if x != nil { + return x.InboxId + } + return "" +} + +func (x *AssociationState) GetMembers() []*MemberMap { + if x != nil { + return x.Members + } + return nil +} + +func (x *AssociationState) GetRecoveryAddress() string { + if x != nil { + return x.RecoveryAddress + } + return "" +} + +func (x *AssociationState) GetSeenSignatures() [][]byte { + if x != nil { + return x.SeenSignatures + } + return nil +} + +// / state diff between two final AssociationStates +type AssociationStateDiff struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NewMembers []*MemberIdentifier `protobuf:"bytes,1,rep,name=new_members,json=newMembers,proto3" json:"new_members,omitempty"` + RemovedMembers []*MemberIdentifier `protobuf:"bytes,2,rep,name=removed_members,json=removedMembers,proto3" json:"removed_members,omitempty"` +} + +func (x *AssociationStateDiff) Reset() { + *x = AssociationStateDiff{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_association_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssociationStateDiff) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssociationStateDiff) ProtoMessage() {} + +func (x *AssociationStateDiff) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_association_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 AssociationStateDiff.ProtoReflect.Descriptor instead. +func (*AssociationStateDiff) Descriptor() ([]byte, []int) { + return file_identity_associations_association_proto_rawDescGZIP(), []int{10} +} + +func (x *AssociationStateDiff) GetNewMembers() []*MemberIdentifier { + if x != nil { + return x.NewMembers + } + return nil +} + +func (x *AssociationStateDiff) GetRemovedMembers() []*MemberIdentifier { + if x != nil { + return x.RemovedMembers + } + return nil +} + +var File_identity_associations_association_proto protoreflect.FileDescriptor + +var file_identity_associations_association_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x61, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x25, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, + 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x70, 0x0a, 0x10, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x12, 0x1a, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, 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, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, + 0x15, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xc5, + 0x01, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x0a, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x0f, 0x61, 0x64, 0x64, 0x65, 0x64, + 0x5f, 0x62, 0x79, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, + 0x52, 0x0d, 0x61, 0x64, 0x64, 0x65, 0x64, 0x42, 0x79, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x88, + 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0xaf, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x19, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, + 0x17, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xae, 0x02, 0x0a, 0x0e, 0x41, 0x64, 0x64, + 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x15, 0x6e, + 0x65, 0x77, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x13, 0x6e, 0x65, 0x77, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x61, 0x0a, + 0x19, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x17, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x12, 0x57, 0x0a, 0x14, 0x6e, 0x65, 0x77, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x12, 0x6e, 0x65, 0x77, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xd0, 0x01, 0x0a, 0x11, 0x52, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x56, 0x0a, 0x10, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x54, + 0x6f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x63, 0x0a, 0x1a, 0x72, 0x65, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x52, 0x18, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xbf, 0x01, 0x0a, + 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x65, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6e, 0x65, 0x77, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x74, 0x0a, 0x23, 0x65, 0x78, 0x69, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x20, 0x65, 0x78, + 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xdc, + 0x02, 0x0a, 0x0e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x4c, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x62, 0x6f, + 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, + 0x48, 0x00, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, + 0x3e, 0x0a, 0x03, 0x61, 0x64, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x03, 0x61, 0x64, 0x64, 0x12, + 0x47, 0x0a, 0x06, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, + 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x06, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x6b, 0x0a, 0x17, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x15, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xa1, 0x01, + 0x0a, 0x0e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x12, 0x44, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x11, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x4e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x49, + 0x64, 0x22, 0x85, 0x01, 0x0a, 0x09, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x12, + 0x3e, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x38, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc2, 0x01, 0x0a, 0x10, 0x41, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x19, + 0x0a, 0x08, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x07, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x61, + 0x70, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x65, 0x6e, 0x5f, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0e, + 0x73, 0x65, 0x65, 0x6e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xbc, + 0x01, 0x0a, 0x14, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x12, 0x4d, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x55, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, + 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0e, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x42, 0xf3, 0x01, + 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x42, 0x10, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 0x2f, 0x70, 0x6b, 0x67, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x61, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x03, 0x58, 0x49, + 0x41, 0xaa, 0x02, 0x1a, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xca, 0x02, + 0x1a, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5c, 0x41, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xe2, 0x02, 0x26, 0x58, 0x6d, + 0x74, 0x70, 0x5c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5c, 0x41, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x3a, 0x3a, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_identity_associations_association_proto_rawDescOnce sync.Once + file_identity_associations_association_proto_rawDescData = file_identity_associations_association_proto_rawDesc +) + +func file_identity_associations_association_proto_rawDescGZIP() []byte { + file_identity_associations_association_proto_rawDescOnce.Do(func() { + file_identity_associations_association_proto_rawDescData = protoimpl.X.CompressGZIP(file_identity_associations_association_proto_rawDescData) + }) + return file_identity_associations_association_proto_rawDescData +} + +var file_identity_associations_association_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_identity_associations_association_proto_goTypes = []any{ + (*MemberIdentifier)(nil), // 0: xmtp.identity.associations.MemberIdentifier + (*Member)(nil), // 1: xmtp.identity.associations.Member + (*CreateInbox)(nil), // 2: xmtp.identity.associations.CreateInbox + (*AddAssociation)(nil), // 3: xmtp.identity.associations.AddAssociation + (*RevokeAssociation)(nil), // 4: xmtp.identity.associations.RevokeAssociation + (*ChangeRecoveryAddress)(nil), // 5: xmtp.identity.associations.ChangeRecoveryAddress + (*IdentityAction)(nil), // 6: xmtp.identity.associations.IdentityAction + (*IdentityUpdate)(nil), // 7: xmtp.identity.associations.IdentityUpdate + (*MemberMap)(nil), // 8: xmtp.identity.associations.MemberMap + (*AssociationState)(nil), // 9: xmtp.identity.associations.AssociationState + (*AssociationStateDiff)(nil), // 10: xmtp.identity.associations.AssociationStateDiff + (*Signature)(nil), // 11: xmtp.identity.associations.Signature +} +var file_identity_associations_association_proto_depIdxs = []int32{ + 0, // 0: xmtp.identity.associations.Member.identifier:type_name -> xmtp.identity.associations.MemberIdentifier + 0, // 1: xmtp.identity.associations.Member.added_by_entity:type_name -> xmtp.identity.associations.MemberIdentifier + 11, // 2: xmtp.identity.associations.CreateInbox.initial_address_signature:type_name -> xmtp.identity.associations.Signature + 0, // 3: xmtp.identity.associations.AddAssociation.new_member_identifier:type_name -> xmtp.identity.associations.MemberIdentifier + 11, // 4: xmtp.identity.associations.AddAssociation.existing_member_signature:type_name -> xmtp.identity.associations.Signature + 11, // 5: xmtp.identity.associations.AddAssociation.new_member_signature:type_name -> xmtp.identity.associations.Signature + 0, // 6: xmtp.identity.associations.RevokeAssociation.member_to_revoke:type_name -> xmtp.identity.associations.MemberIdentifier + 11, // 7: xmtp.identity.associations.RevokeAssociation.recovery_address_signature:type_name -> xmtp.identity.associations.Signature + 11, // 8: xmtp.identity.associations.ChangeRecoveryAddress.existing_recovery_address_signature:type_name -> xmtp.identity.associations.Signature + 2, // 9: xmtp.identity.associations.IdentityAction.create_inbox:type_name -> xmtp.identity.associations.CreateInbox + 3, // 10: xmtp.identity.associations.IdentityAction.add:type_name -> xmtp.identity.associations.AddAssociation + 4, // 11: xmtp.identity.associations.IdentityAction.revoke:type_name -> xmtp.identity.associations.RevokeAssociation + 5, // 12: xmtp.identity.associations.IdentityAction.change_recovery_address:type_name -> xmtp.identity.associations.ChangeRecoveryAddress + 6, // 13: xmtp.identity.associations.IdentityUpdate.actions:type_name -> xmtp.identity.associations.IdentityAction + 0, // 14: xmtp.identity.associations.MemberMap.key:type_name -> xmtp.identity.associations.MemberIdentifier + 1, // 15: xmtp.identity.associations.MemberMap.value:type_name -> xmtp.identity.associations.Member + 8, // 16: xmtp.identity.associations.AssociationState.members:type_name -> xmtp.identity.associations.MemberMap + 0, // 17: xmtp.identity.associations.AssociationStateDiff.new_members:type_name -> xmtp.identity.associations.MemberIdentifier + 0, // 18: xmtp.identity.associations.AssociationStateDiff.removed_members:type_name -> xmtp.identity.associations.MemberIdentifier + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_identity_associations_association_proto_init() } +func file_identity_associations_association_proto_init() { + if File_identity_associations_association_proto != nil { + return + } + file_identity_associations_signature_proto_init() + if !protoimpl.UnsafeEnabled { + file_identity_associations_association_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*MemberIdentifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_association_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*Member); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_association_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CreateInbox); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_association_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*AddAssociation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_association_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*RevokeAssociation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_association_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ChangeRecoveryAddress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_association_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*IdentityAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_association_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*IdentityUpdate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_association_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*MemberMap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_association_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*AssociationState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_association_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*AssociationStateDiff); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_identity_associations_association_proto_msgTypes[0].OneofWrappers = []any{ + (*MemberIdentifier_Address)(nil), + (*MemberIdentifier_InstallationPublicKey)(nil), + } + file_identity_associations_association_proto_msgTypes[1].OneofWrappers = []any{} + file_identity_associations_association_proto_msgTypes[6].OneofWrappers = []any{ + (*IdentityAction_CreateInbox)(nil), + (*IdentityAction_Add)(nil), + (*IdentityAction_Revoke)(nil), + (*IdentityAction_ChangeRecoveryAddress)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_identity_associations_association_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_identity_associations_association_proto_goTypes, + DependencyIndexes: file_identity_associations_association_proto_depIdxs, + MessageInfos: file_identity_associations_association_proto_msgTypes, + }.Build() + File_identity_associations_association_proto = out.File + file_identity_associations_association_proto_rawDesc = nil + file_identity_associations_association_proto_goTypes = nil + file_identity_associations_association_proto_depIdxs = nil +} diff --git a/pkg/proto/identity/associations/signature.pb.go b/pkg/proto/identity/associations/signature.pb.go new file mode 100644 index 00000000..3ce57376 --- /dev/null +++ b/pkg/proto/identity/associations/signature.pb.go @@ -0,0 +1,583 @@ +// Signing methods for identity associations + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: identity/associations/signature.proto + +package associations + +import ( + message_contents "github.com/xmtp/xmtpd/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) +) + +// RecoverableEcdsaSignature for EIP-191 and V2 signatures +type RecoverableEcdsaSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 65-bytes [ R || S || V ], with 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_identity_associations_signature_proto_msgTypes[0] + 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_identity_associations_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 RecoverableEcdsaSignature.ProtoReflect.Descriptor instead. +func (*RecoverableEcdsaSignature) Descriptor() ([]byte, []int) { + return file_identity_associations_signature_proto_rawDescGZIP(), []int{0} +} + +func (x *RecoverableEcdsaSignature) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +// EdDSA signature for 25519 +type RecoverableEd25519Signature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 64 bytes [R(32 bytes) || S(32 bytes)] + Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` + // 32 bytes + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` +} + +func (x *RecoverableEd25519Signature) Reset() { + *x = RecoverableEd25519Signature{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_signature_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecoverableEd25519Signature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecoverableEd25519Signature) ProtoMessage() {} + +func (x *RecoverableEd25519Signature) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_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 RecoverableEd25519Signature.ProtoReflect.Descriptor instead. +func (*RecoverableEd25519Signature) Descriptor() ([]byte, []int) { + return file_identity_associations_signature_proto_rawDescGZIP(), []int{1} +} + +func (x *RecoverableEd25519Signature) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +func (x *RecoverableEd25519Signature) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +// Smart wallet signature +type Erc1271Signature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // CAIP-10 + // https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-10.md + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + // Specify the block number to verify the signature against + BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + // The actual signature bytes + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *Erc1271Signature) Reset() { + *x = Erc1271Signature{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_signature_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Erc1271Signature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Erc1271Signature) ProtoMessage() {} + +func (x *Erc1271Signature) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_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 Erc1271Signature.ProtoReflect.Descriptor instead. +func (*Erc1271Signature) Descriptor() ([]byte, []int) { + return file_identity_associations_signature_proto_rawDescGZIP(), []int{2} +} + +func (x *Erc1271Signature) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *Erc1271Signature) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Erc1271Signature) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +// An existing address on xmtpv2 may have already signed a legacy identity key +// of type SignedPublicKey via the 'Create Identity' signature. +// For migration to xmtpv3, the legacy key is permitted to sign on behalf of the +// address to create a matching xmtpv3 installation key. +// This signature type can ONLY be used for CreateXid and AddAssociation +// payloads, and can only be used once in xmtpv3. +type LegacyDelegatedSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DelegatedKey *message_contents.SignedPublicKey `protobuf:"bytes,1,opt,name=delegated_key,json=delegatedKey,proto3" json:"delegated_key,omitempty"` + Signature *RecoverableEcdsaSignature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *LegacyDelegatedSignature) Reset() { + *x = LegacyDelegatedSignature{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_signature_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LegacyDelegatedSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LegacyDelegatedSignature) ProtoMessage() {} + +func (x *LegacyDelegatedSignature) ProtoReflect() protoreflect.Message { + mi := &file_identity_associations_signature_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 LegacyDelegatedSignature.ProtoReflect.Descriptor instead. +func (*LegacyDelegatedSignature) Descriptor() ([]byte, []int) { + return file_identity_associations_signature_proto_rawDescGZIP(), []int{3} +} + +func (x *LegacyDelegatedSignature) GetDelegatedKey() *message_contents.SignedPublicKey { + if x != nil { + return x.DelegatedKey + } + return nil +} + +func (x *LegacyDelegatedSignature) GetSignature() *RecoverableEcdsaSignature { + if x != nil { + return x.Signature + } + return nil +} + +// A wrapper for all possible signature types +type Signature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Must have two properties: + // 1. An identifier (address or public key) for the signer must either be + // recoverable, or specified as a field. + // 2. The signer certifies that the signing payload is correct. The payload + // must be inferred from the context in which the signature is provided. + // + // Types that are assignable to Signature: + // + // *Signature_Erc_191 + // *Signature_Erc_1271 + // *Signature_InstallationKey + // *Signature_DelegatedErc_191 + Signature isSignature_Signature `protobuf_oneof:"signature"` +} + +func (x *Signature) Reset() { + *x = Signature{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_associations_signature_proto_msgTypes[4] + 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_identity_associations_signature_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 Signature.ProtoReflect.Descriptor instead. +func (*Signature) Descriptor() ([]byte, []int) { + return file_identity_associations_signature_proto_rawDescGZIP(), []int{4} +} + +func (m *Signature) GetSignature() isSignature_Signature { + if m != nil { + return m.Signature + } + return nil +} + +func (x *Signature) GetErc_191() *RecoverableEcdsaSignature { + if x, ok := x.GetSignature().(*Signature_Erc_191); ok { + return x.Erc_191 + } + return nil +} + +func (x *Signature) GetErc_1271() *Erc1271Signature { + if x, ok := x.GetSignature().(*Signature_Erc_1271); ok { + return x.Erc_1271 + } + return nil +} + +func (x *Signature) GetInstallationKey() *RecoverableEd25519Signature { + if x, ok := x.GetSignature().(*Signature_InstallationKey); ok { + return x.InstallationKey + } + return nil +} + +func (x *Signature) GetDelegatedErc_191() *LegacyDelegatedSignature { + if x, ok := x.GetSignature().(*Signature_DelegatedErc_191); ok { + return x.DelegatedErc_191 + } + return nil +} + +type isSignature_Signature interface { + isSignature_Signature() +} + +type Signature_Erc_191 struct { + Erc_191 *RecoverableEcdsaSignature `protobuf:"bytes,1,opt,name=erc_191,json=erc191,proto3,oneof"` +} + +type Signature_Erc_1271 struct { + Erc_1271 *Erc1271Signature `protobuf:"bytes,2,opt,name=erc_1271,json=erc1271,proto3,oneof"` +} + +type Signature_InstallationKey struct { + InstallationKey *RecoverableEd25519Signature `protobuf:"bytes,3,opt,name=installation_key,json=installationKey,proto3,oneof"` +} + +type Signature_DelegatedErc_191 struct { + DelegatedErc_191 *LegacyDelegatedSignature `protobuf:"bytes,4,opt,name=delegated_erc_191,json=delegatedErc191,proto3,oneof"` +} + +func (*Signature_Erc_191) isSignature_Signature() {} + +func (*Signature_Erc_1271) isSignature_Signature() {} + +func (*Signature_InstallationKey) isSignature_Signature() {} + +func (*Signature_DelegatedErc_191) isSignature_Signature() {} + +var File_identity_associations_signature_proto protoreflect.FileDescriptor + +var file_identity_associations_signature_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x61, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 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, 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, 0x52, 0x0a, 0x1b, 0x52, 0x65, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 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, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x72, 0x0a, + 0x10, 0x45, 0x72, 0x63, 0x31, 0x32, 0x37, 0x31, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x18, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x4b, + 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 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, 0x0c, 0x64, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x12, 0x53, 0x0a, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, + 0x22, 0xff, 0x02, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x50, + 0x0a, 0x07, 0x65, 0x72, 0x63, 0x5f, 0x31, 0x39, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x35, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, + 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x48, 0x00, 0x52, 0x06, 0x65, 0x72, 0x63, 0x31, 0x39, 0x31, + 0x12, 0x49, 0x0a, 0x08, 0x65, 0x72, 0x63, 0x5f, 0x31, 0x32, 0x37, 0x31, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x45, 0x72, 0x63, 0x31, 0x32, 0x37, 0x31, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x48, 0x00, 0x52, 0x07, 0x65, 0x72, 0x63, 0x31, 0x32, 0x37, 0x31, 0x12, 0x64, 0x0a, 0x10, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x64, + 0x32, 0x35, 0x35, 0x31, 0x39, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x48, 0x00, + 0x52, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, + 0x79, 0x12, 0x62, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x65, + 0x72, 0x63, 0x5f, 0x31, 0x39, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x45, + 0x72, 0x63, 0x31, 0x39, 0x31, 0x42, 0x0b, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x42, 0xf1, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x2f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, + 0x03, 0x58, 0x49, 0x41, 0xaa, 0x02, 0x1a, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0xca, 0x02, 0x1a, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x5c, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xe2, 0x02, + 0x26, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5c, 0x41, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x3a, 0x3a, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_identity_associations_signature_proto_rawDescOnce sync.Once + file_identity_associations_signature_proto_rawDescData = file_identity_associations_signature_proto_rawDesc +) + +func file_identity_associations_signature_proto_rawDescGZIP() []byte { + file_identity_associations_signature_proto_rawDescOnce.Do(func() { + file_identity_associations_signature_proto_rawDescData = protoimpl.X.CompressGZIP(file_identity_associations_signature_proto_rawDescData) + }) + return file_identity_associations_signature_proto_rawDescData +} + +var file_identity_associations_signature_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_identity_associations_signature_proto_goTypes = []any{ + (*RecoverableEcdsaSignature)(nil), // 0: xmtp.identity.associations.RecoverableEcdsaSignature + (*RecoverableEd25519Signature)(nil), // 1: xmtp.identity.associations.RecoverableEd25519Signature + (*Erc1271Signature)(nil), // 2: xmtp.identity.associations.Erc1271Signature + (*LegacyDelegatedSignature)(nil), // 3: xmtp.identity.associations.LegacyDelegatedSignature + (*Signature)(nil), // 4: xmtp.identity.associations.Signature + (*message_contents.SignedPublicKey)(nil), // 5: xmtp.message_contents.SignedPublicKey +} +var file_identity_associations_signature_proto_depIdxs = []int32{ + 5, // 0: xmtp.identity.associations.LegacyDelegatedSignature.delegated_key:type_name -> xmtp.message_contents.SignedPublicKey + 0, // 1: xmtp.identity.associations.LegacyDelegatedSignature.signature:type_name -> xmtp.identity.associations.RecoverableEcdsaSignature + 0, // 2: xmtp.identity.associations.Signature.erc_191:type_name -> xmtp.identity.associations.RecoverableEcdsaSignature + 2, // 3: xmtp.identity.associations.Signature.erc_1271:type_name -> xmtp.identity.associations.Erc1271Signature + 1, // 4: xmtp.identity.associations.Signature.installation_key:type_name -> xmtp.identity.associations.RecoverableEd25519Signature + 3, // 5: xmtp.identity.associations.Signature.delegated_erc_191:type_name -> xmtp.identity.associations.LegacyDelegatedSignature + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_identity_associations_signature_proto_init() } +func file_identity_associations_signature_proto_init() { + if File_identity_associations_signature_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_identity_associations_signature_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*RecoverableEcdsaSignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_signature_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*RecoverableEd25519Signature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_signature_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*Erc1271Signature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_signature_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*LegacyDelegatedSignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_identity_associations_signature_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*Signature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_identity_associations_signature_proto_msgTypes[4].OneofWrappers = []any{ + (*Signature_Erc_191)(nil), + (*Signature_Erc_1271)(nil), + (*Signature_InstallationKey)(nil), + (*Signature_DelegatedErc_191)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_identity_associations_signature_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_identity_associations_signature_proto_goTypes, + DependencyIndexes: file_identity_associations_signature_proto_depIdxs, + MessageInfos: file_identity_associations_signature_proto_msgTypes, + }.Build() + File_identity_associations_signature_proto = out.File + file_identity_associations_signature_proto_rawDesc = nil + file_identity_associations_signature_proto_goTypes = nil + file_identity_associations_signature_proto_depIdxs = nil +} diff --git a/pkg/proto/identity/credential.pb.go b/pkg/proto/identity/credential.pb.go new file mode 100644 index 00000000..d1a03334 --- /dev/null +++ b/pkg/proto/identity/credential.pb.go @@ -0,0 +1,156 @@ +// Credentials + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: identity/credential.proto + +package identity + +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 + + InboxId string `protobuf:"bytes,1,opt,name=inbox_id,json=inboxId,proto3" json:"inbox_id,omitempty"` +} + +func (x *MlsCredential) Reset() { + *x = MlsCredential{} + if protoimpl.UnsafeEnabled { + mi := &file_identity_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_identity_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_identity_credential_proto_rawDescGZIP(), []int{0} +} + +func (x *MlsCredential) GetInboxId() string { + if x != nil { + return x.InboxId + } + return "" +} + +var File_identity_credential_proto protoreflect.FileDescriptor + +var file_identity_credential_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x63, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x2a, 0x0a, 0x0d, 0x4d, 0x6c, + 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, + 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, + 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x42, 0xa3, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x0f, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, + 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0xa2, 0x02, 0x03, 0x58, 0x49, 0x58, 0xaa, + 0x02, 0x0d, 0x58, 0x6d, 0x74, 0x70, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0xca, + 0x02, 0x0d, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0xe2, + 0x02, 0x19, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x58, 0x6d, + 0x74, 0x70, 0x3a, 0x3a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_identity_credential_proto_rawDescOnce sync.Once + file_identity_credential_proto_rawDescData = file_identity_credential_proto_rawDesc +) + +func file_identity_credential_proto_rawDescGZIP() []byte { + file_identity_credential_proto_rawDescOnce.Do(func() { + file_identity_credential_proto_rawDescData = protoimpl.X.CompressGZIP(file_identity_credential_proto_rawDescData) + }) + return file_identity_credential_proto_rawDescData +} + +var file_identity_credential_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_identity_credential_proto_goTypes = []any{ + (*MlsCredential)(nil), // 0: xmtp.identity.MlsCredential +} +var file_identity_credential_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_identity_credential_proto_init() } +func file_identity_credential_proto_init() { + if File_identity_credential_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_identity_credential_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*MlsCredential); 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_identity_credential_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_identity_credential_proto_goTypes, + DependencyIndexes: file_identity_credential_proto_depIdxs, + MessageInfos: file_identity_credential_proto_msgTypes, + }.Build() + File_identity_credential_proto = out.File + file_identity_credential_proto_rawDesc = nil + file_identity_credential_proto_goTypes = nil + file_identity_credential_proto_depIdxs = nil +} 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..50f145b4 --- /dev/null +++ b/pkg/proto/keystore_api/v1/keystore.pb.go @@ -0,0 +1,4044 @@ +// Message content encoding structures + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: keystore_api/v1/keystore.proto + +package keystore_apiv1 + +import ( + message_contents "github.com/xmtp/xmtpd/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"` + ConsentProof *message_contents.ConsentProofPayload `protobuf:"bytes,4,opt,name=consent_proof,json=consentProof,proto3" json:"consent_proof,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 +} + +func (x *CreateInviteRequest) GetConsentProof() *message_contents.ConsentProofPayload { + if x != nil { + return x.ConsentProof + } + return nil +} + +// 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 +} + +// Used to get a mapping of conversation topics to their HMAC keys +type GetConversationHmacKeysRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Topics []string `protobuf:"bytes,1,rep,name=topics,proto3" json:"topics,omitempty"` +} + +func (x *GetConversationHmacKeysRequest) Reset() { + *x = GetConversationHmacKeysRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConversationHmacKeysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConversationHmacKeysRequest) ProtoMessage() {} + +func (x *GetConversationHmacKeysRequest) 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 GetConversationHmacKeysRequest.ProtoReflect.Descriptor instead. +func (*GetConversationHmacKeysRequest) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{29} +} + +func (x *GetConversationHmacKeysRequest) GetTopics() []string { + if x != nil { + return x.Topics + } + return nil +} + +// A mapping of topics to their HMAC keys +type GetConversationHmacKeysResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HmacKeys map[string]*GetConversationHmacKeysResponse_HmacKeys `protobuf:"bytes,1,rep,name=hmac_keys,json=hmacKeys,proto3" json:"hmac_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *GetConversationHmacKeysResponse) Reset() { + *x = GetConversationHmacKeysResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConversationHmacKeysResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConversationHmacKeysResponse) ProtoMessage() {} + +func (x *GetConversationHmacKeysResponse) 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 GetConversationHmacKeysResponse.ProtoReflect.Descriptor instead. +func (*GetConversationHmacKeysResponse) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{30} +} + +func (x *GetConversationHmacKeysResponse) GetHmacKeys() map[string]*GetConversationHmacKeysResponse_HmacKeys { + if x != nil { + return x.HmacKeys + } + 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[31] + 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[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 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[32] + 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[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 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[33] + 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[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 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[34] + 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[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 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[35] + 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[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 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[36] + 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[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 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"` + SenderHmac []byte `protobuf:"bytes,2,opt,name=sender_hmac,json=senderHmac,proto3" json:"sender_hmac,omitempty"` +} + +func (x *EncryptResponse_Response_Success) Reset() { + *x = EncryptResponse_Response_Success{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[37] + 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[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 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 +} + +func (x *EncryptResponse_Response_Success) GetSenderHmac() []byte { + if x != nil { + return x.SenderHmac + } + 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[38] + 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[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 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[39] + 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[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 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[40] + 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[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 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[41] + 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[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 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[42] + 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[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 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[43] + 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[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 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[44] + 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[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 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[45] + 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[45] + 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[46] + 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[46] + 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 +} + +// HmacKeyData wraps the HMAC key and the number of 30 day periods since epoch +type GetConversationHmacKeysResponse_HmacKeyData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ThirtyDayPeriodsSinceEpoch int32 `protobuf:"varint,1,opt,name=thirty_day_periods_since_epoch,json=thirtyDayPeriodsSinceEpoch,proto3" json:"thirty_day_periods_since_epoch,omitempty"` + HmacKey []byte `protobuf:"bytes,2,opt,name=hmac_key,json=hmacKey,proto3" json:"hmac_key,omitempty"` +} + +func (x *GetConversationHmacKeysResponse_HmacKeyData) Reset() { + *x = GetConversationHmacKeysResponse_HmacKeyData{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConversationHmacKeysResponse_HmacKeyData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConversationHmacKeysResponse_HmacKeyData) ProtoMessage() {} + +func (x *GetConversationHmacKeysResponse_HmacKeyData) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[48] + 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 GetConversationHmacKeysResponse_HmacKeyData.ProtoReflect.Descriptor instead. +func (*GetConversationHmacKeysResponse_HmacKeyData) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{30, 0} +} + +func (x *GetConversationHmacKeysResponse_HmacKeyData) GetThirtyDayPeriodsSinceEpoch() int32 { + if x != nil { + return x.ThirtyDayPeriodsSinceEpoch + } + return 0 +} + +func (x *GetConversationHmacKeysResponse_HmacKeyData) GetHmacKey() []byte { + if x != nil { + return x.HmacKey + } + return nil +} + +// HmacKeys represents multiple HmacKeyData objects +type GetConversationHmacKeysResponse_HmacKeys struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Values []*GetConversationHmacKeysResponse_HmacKeyData `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *GetConversationHmacKeysResponse_HmacKeys) Reset() { + *x = GetConversationHmacKeysResponse_HmacKeys{} + if protoimpl.UnsafeEnabled { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConversationHmacKeysResponse_HmacKeys) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConversationHmacKeysResponse_HmacKeys) ProtoMessage() {} + +func (x *GetConversationHmacKeysResponse_HmacKeys) ProtoReflect() protoreflect.Message { + mi := &file_keystore_api_v1_keystore_proto_msgTypes[49] + 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 GetConversationHmacKeysResponse_HmacKeys.ProtoReflect.Descriptor instead. +func (*GetConversationHmacKeysResponse_HmacKeys) Descriptor() ([]byte, []int) { + return file_keystore_api_v1_keystore_proto_rawDescGZIP(), []int{30, 1} +} + +func (x *GetConversationHmacKeysResponse_HmacKeys) GetValues() []*GetConversationHmacKeysResponse_HmacKeyData { + if x != nil { + return x.Values + } + 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, 0xf4, 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, 0x92, 0x02, 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, 0x6b, 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, + 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x6d, 0x61, 0x63, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x6d, 0x61, + 0x63, 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, 0x98, + 0x02, 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, 0x12, 0x4f, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 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, 0x73, 0x65, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x0c, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 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, 0x22, 0x38, 0x0a, 0x1e, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x6d, 0x61, 0x63, + 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, + 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, + 0x69, 0x63, 0x73, 0x22, 0xd5, 0x03, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x6d, 0x61, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x09, 0x68, 0x6d, 0x61, 0x63, 0x5f, + 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 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, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x6d, 0x61, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x48, 0x6d, 0x61, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x08, 0x68, 0x6d, 0x61, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x1a, 0x6c, 0x0a, 0x0b, 0x48, 0x6d, 0x61, + 0x63, 0x4b, 0x65, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x1e, 0x74, 0x68, 0x69, 0x72, + 0x74, 0x79, 0x5f, 0x64, 0x61, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x5f, 0x73, + 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x1a, 0x74, 0x68, 0x69, 0x72, 0x74, 0x79, 0x44, 0x61, 0x79, 0x50, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x19, 0x0a, 0x08, + 0x68, 0x6d, 0x61, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, + 0x68, 0x6d, 0x61, 0x63, 0x4b, 0x65, 0x79, 0x1a, 0x65, 0x0a, 0x08, 0x48, 0x6d, 0x61, 0x63, 0x4b, + 0x65, 0x79, 0x73, 0x12, 0x59, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x41, 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, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x6d, 0x61, 0x63, 0x4b, 0x65, + 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x6d, 0x61, 0x63, 0x4b, + 0x65, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x7b, + 0x0a, 0x0d, 0x48, 0x6d, 0x61, 0x63, 0x4b, 0x65, 0x79, 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, 0x54, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 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, 0x43, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x6d, 0x61, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x6d, 0x61, 0x63, 0x4b, 0x65, 0x79, 0x73, + 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, 0xd7, 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, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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, 51) +var file_keystore_api_v1_keystore_proto_goTypes = []any{ + (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 + (*GetConversationHmacKeysRequest)(nil), // 32: xmtp.keystore_api.v1.GetConversationHmacKeysRequest + (*GetConversationHmacKeysResponse)(nil), // 33: xmtp.keystore_api.v1.GetConversationHmacKeysResponse + (*DecryptV1Request_Request)(nil), // 34: xmtp.keystore_api.v1.DecryptV1Request.Request + (*DecryptResponse_Response)(nil), // 35: xmtp.keystore_api.v1.DecryptResponse.Response + (*DecryptResponse_Response_Success)(nil), // 36: xmtp.keystore_api.v1.DecryptResponse.Response.Success + (*DecryptV2Request_Request)(nil), // 37: xmtp.keystore_api.v1.DecryptV2Request.Request + (*EncryptV1Request_Request)(nil), // 38: xmtp.keystore_api.v1.EncryptV1Request.Request + (*EncryptResponse_Response)(nil), // 39: xmtp.keystore_api.v1.EncryptResponse.Response + (*EncryptResponse_Response_Success)(nil), // 40: xmtp.keystore_api.v1.EncryptResponse.Response.Success + (*EncryptV2Request_Request)(nil), // 41: xmtp.keystore_api.v1.EncryptV2Request.Request + (*SelfEncryptRequest_Request)(nil), // 42: xmtp.keystore_api.v1.SelfEncryptRequest.Request + (*SelfEncryptResponse_Response)(nil), // 43: xmtp.keystore_api.v1.SelfEncryptResponse.Response + (*SelfEncryptResponse_Response_Success)(nil), // 44: xmtp.keystore_api.v1.SelfEncryptResponse.Response.Success + (*SelfDecryptRequest_Request)(nil), // 45: xmtp.keystore_api.v1.SelfDecryptRequest.Request + (*SaveInvitesRequest_Request)(nil), // 46: xmtp.keystore_api.v1.SaveInvitesRequest.Request + (*SaveInvitesResponse_Response)(nil), // 47: xmtp.keystore_api.v1.SaveInvitesResponse.Response + (*SaveInvitesResponse_Response_Success)(nil), // 48: xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success + (*TopicMap_TopicData)(nil), // 49: xmtp.keystore_api.v1.TopicMap.TopicData + nil, // 50: xmtp.keystore_api.v1.TopicMap.TopicsEntry + (*GetConversationHmacKeysResponse_HmacKeyData)(nil), // 51: xmtp.keystore_api.v1.GetConversationHmacKeysResponse.HmacKeyData + (*GetConversationHmacKeysResponse_HmacKeys)(nil), // 52: xmtp.keystore_api.v1.GetConversationHmacKeysResponse.HmacKeys + nil, // 53: xmtp.keystore_api.v1.GetConversationHmacKeysResponse.HmacKeysEntry + (*message_contents.InvitationV1_Context)(nil), // 54: xmtp.message_contents.InvitationV1.Context + (*message_contents.SignedPublicKeyBundle)(nil), // 55: xmtp.message_contents.SignedPublicKeyBundle + (*message_contents.ConsentProofPayload)(nil), // 56: xmtp.message_contents.ConsentProofPayload + (*message_contents.ConversationReference)(nil), // 57: xmtp.message_contents.ConversationReference + (*message_contents.PrivateKeyBundleV1)(nil), // 58: xmtp.message_contents.PrivateKeyBundleV1 + (*message_contents.Ciphertext)(nil), // 59: xmtp.message_contents.Ciphertext + (*message_contents.PublicKeyBundle)(nil), // 60: xmtp.message_contents.PublicKeyBundle + (*message_contents.InvitationV1)(nil), // 61: 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 + 34, // 1: xmtp.keystore_api.v1.DecryptV1Request.requests:type_name -> xmtp.keystore_api.v1.DecryptV1Request.Request + 35, // 2: xmtp.keystore_api.v1.DecryptResponse.responses:type_name -> xmtp.keystore_api.v1.DecryptResponse.Response + 37, // 3: xmtp.keystore_api.v1.DecryptV2Request.requests:type_name -> xmtp.keystore_api.v1.DecryptV2Request.Request + 38, // 4: xmtp.keystore_api.v1.EncryptV1Request.requests:type_name -> xmtp.keystore_api.v1.EncryptV1Request.Request + 39, // 5: xmtp.keystore_api.v1.EncryptResponse.responses:type_name -> xmtp.keystore_api.v1.EncryptResponse.Response + 41, // 6: xmtp.keystore_api.v1.EncryptV2Request.requests:type_name -> xmtp.keystore_api.v1.EncryptV2Request.Request + 42, // 7: xmtp.keystore_api.v1.SelfEncryptRequest.requests:type_name -> xmtp.keystore_api.v1.SelfEncryptRequest.Request + 43, // 8: xmtp.keystore_api.v1.SelfEncryptResponse.responses:type_name -> xmtp.keystore_api.v1.SelfEncryptResponse.Response + 45, // 9: xmtp.keystore_api.v1.SelfDecryptRequest.requests:type_name -> xmtp.keystore_api.v1.SelfDecryptRequest.Request + 54, // 10: xmtp.keystore_api.v1.CreateInviteRequest.context:type_name -> xmtp.message_contents.InvitationV1.Context + 55, // 11: xmtp.keystore_api.v1.CreateInviteRequest.recipient:type_name -> xmtp.message_contents.SignedPublicKeyBundle + 56, // 12: xmtp.keystore_api.v1.CreateInviteRequest.consent_proof:type_name -> xmtp.message_contents.ConsentProofPayload + 57, // 13: xmtp.keystore_api.v1.CreateInviteResponse.conversation:type_name -> xmtp.message_contents.ConversationReference + 46, // 14: xmtp.keystore_api.v1.SaveInvitesRequest.requests:type_name -> xmtp.keystore_api.v1.SaveInvitesRequest.Request + 47, // 15: xmtp.keystore_api.v1.SaveInvitesResponse.responses:type_name -> xmtp.keystore_api.v1.SaveInvitesResponse.Response + 57, // 16: xmtp.keystore_api.v1.SaveV1ConversationsRequest.conversations:type_name -> xmtp.message_contents.ConversationReference + 57, // 17: xmtp.keystore_api.v1.GetConversationsResponse.conversations:type_name -> xmtp.message_contents.ConversationReference + 2, // 18: xmtp.keystore_api.v1.GetKeystoreStatusResponse.status:type_name -> xmtp.keystore_api.v1.GetKeystoreStatusResponse.KeystoreStatus + 58, // 19: xmtp.keystore_api.v1.InitKeystoreRequest.v1:type_name -> xmtp.message_contents.PrivateKeyBundleV1 + 3, // 20: xmtp.keystore_api.v1.InitKeystoreResponse.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 1, // 21: xmtp.keystore_api.v1.GetRefreshJobRequest.job_type:type_name -> xmtp.keystore_api.v1.JobType + 1, // 22: xmtp.keystore_api.v1.SetRefeshJobRequest.job_type:type_name -> xmtp.keystore_api.v1.JobType + 50, // 23: xmtp.keystore_api.v1.TopicMap.topics:type_name -> xmtp.keystore_api.v1.TopicMap.TopicsEntry + 53, // 24: xmtp.keystore_api.v1.GetConversationHmacKeysResponse.hmac_keys:type_name -> xmtp.keystore_api.v1.GetConversationHmacKeysResponse.HmacKeysEntry + 59, // 25: xmtp.keystore_api.v1.DecryptV1Request.Request.payload:type_name -> xmtp.message_contents.Ciphertext + 60, // 26: xmtp.keystore_api.v1.DecryptV1Request.Request.peer_keys:type_name -> xmtp.message_contents.PublicKeyBundle + 36, // 27: xmtp.keystore_api.v1.DecryptResponse.Response.result:type_name -> xmtp.keystore_api.v1.DecryptResponse.Response.Success + 3, // 28: xmtp.keystore_api.v1.DecryptResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 59, // 29: xmtp.keystore_api.v1.DecryptV2Request.Request.payload:type_name -> xmtp.message_contents.Ciphertext + 60, // 30: xmtp.keystore_api.v1.EncryptV1Request.Request.recipient:type_name -> xmtp.message_contents.PublicKeyBundle + 40, // 31: xmtp.keystore_api.v1.EncryptResponse.Response.result:type_name -> xmtp.keystore_api.v1.EncryptResponse.Response.Success + 3, // 32: xmtp.keystore_api.v1.EncryptResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 59, // 33: xmtp.keystore_api.v1.EncryptResponse.Response.Success.encrypted:type_name -> xmtp.message_contents.Ciphertext + 44, // 34: xmtp.keystore_api.v1.SelfEncryptResponse.Response.result:type_name -> xmtp.keystore_api.v1.SelfEncryptResponse.Response.Success + 3, // 35: xmtp.keystore_api.v1.SelfEncryptResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 48, // 36: xmtp.keystore_api.v1.SaveInvitesResponse.Response.result:type_name -> xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success + 3, // 37: xmtp.keystore_api.v1.SaveInvitesResponse.Response.error:type_name -> xmtp.keystore_api.v1.KeystoreError + 57, // 38: xmtp.keystore_api.v1.SaveInvitesResponse.Response.Success.conversation:type_name -> xmtp.message_contents.ConversationReference + 61, // 39: xmtp.keystore_api.v1.TopicMap.TopicData.invitation:type_name -> xmtp.message_contents.InvitationV1 + 49, // 40: xmtp.keystore_api.v1.TopicMap.TopicsEntry.value:type_name -> xmtp.keystore_api.v1.TopicMap.TopicData + 51, // 41: xmtp.keystore_api.v1.GetConversationHmacKeysResponse.HmacKeys.values:type_name -> xmtp.keystore_api.v1.GetConversationHmacKeysResponse.HmacKeyData + 52, // 42: xmtp.keystore_api.v1.GetConversationHmacKeysResponse.HmacKeysEntry.value:type_name -> xmtp.keystore_api.v1.GetConversationHmacKeysResponse.HmacKeys + 43, // [43:43] is the sub-list for method output_type + 43, // [43:43] is the sub-list for method input_type + 43, // [43:43] is the sub-list for extension type_name + 43, // [43:43] is the sub-list for extension extendee + 0, // [0:43] 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + switch v := v.(*GetConversationHmacKeysRequest); 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 any, i int) any { + switch v := v.(*GetConversationHmacKeysResponse); 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 any, i int) any { + 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[32].Exporter = func(v any, i int) any { + 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[33].Exporter = func(v any, i int) any { + 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[34].Exporter = func(v any, i int) any { + 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[35].Exporter = func(v any, i int) any { + 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[36].Exporter = func(v any, i int) any { + 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[37].Exporter = func(v any, i int) any { + 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[38].Exporter = func(v any, i int) any { + 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[39].Exporter = func(v any, i int) any { + 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[40].Exporter = func(v any, i int) any { + 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[41].Exporter = func(v any, i int) any { + 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[42].Exporter = func(v any, i int) any { + 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[43].Exporter = func(v any, i int) any { + 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[44].Exporter = func(v any, i int) any { + 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[45].Exporter = func(v any, i int) any { + 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[46].Exporter = func(v any, i int) any { + 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[48].Exporter = func(v any, i int) any { + switch v := v.(*GetConversationHmacKeysResponse_HmacKeyData); 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[49].Exporter = func(v any, i int) any { + switch v := v.(*GetConversationHmacKeysResponse_HmacKeys); 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 = []any{} + file_keystore_api_v1_keystore_proto_msgTypes[21].OneofWrappers = []any{ + (*InitKeystoreRequest_V1)(nil), + } + file_keystore_api_v1_keystore_proto_msgTypes[23].OneofWrappers = []any{ + (*SignDigestRequest_IdentityKey)(nil), + (*SignDigestRequest_PrekeyIndex)(nil), + } + file_keystore_api_v1_keystore_proto_msgTypes[32].OneofWrappers = []any{ + (*DecryptResponse_Response_Result)(nil), + (*DecryptResponse_Response_Error)(nil), + } + file_keystore_api_v1_keystore_proto_msgTypes[36].OneofWrappers = []any{ + (*EncryptResponse_Response_Result)(nil), + (*EncryptResponse_Response_Error)(nil), + } + file_keystore_api_v1_keystore_proto_msgTypes[40].OneofWrappers = []any{ + (*SelfEncryptResponse_Response_Result)(nil), + (*SelfEncryptResponse_Response_Error)(nil), + } + file_keystore_api_v1_keystore_proto_msgTypes[44].OneofWrappers = []any{ + (*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: 51, + 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..0eaedac8 --- /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.34.2 +// protoc (unknown) +// source: message_api/v1/authn.proto + +package message_apiv1 + +import ( + message_contents "github.com/xmtp/xmtpd/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, 0xcd, 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, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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 = []any{ + (*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 any, i int) any { + 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 any, i int) any { + 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..7bce2212 --- /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.34.2 +// 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, 0xe8, 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, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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 = []any{ + (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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 = []any{ + (*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..4ec3e566 --- /dev/null +++ b/pkg/proto/message_contents/ciphertext.pb.go @@ -0,0 +1,453 @@ +// Ciphertext is a generic structure for encrypted payload. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// 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, 0xcf, 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, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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 = []any{ + (*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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 = []any{ + (*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..aaf222ac --- /dev/null +++ b/pkg/proto/message_contents/composite.pb.go @@ -0,0 +1,276 @@ +// Composite ContentType + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// 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, 0xce, 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, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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 = []any{ + (*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 any, i int) any { + 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 any, i int) any { + 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 = []any{ + (*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..4831ba81 --- /dev/null +++ b/pkg/proto/message_contents/contact.pb.go @@ -0,0 +1,351 @@ +// 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.34.2 +// 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, 0xcc, 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, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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 = []any{ + (*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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 = []any{ + (*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..2aaa16f6 --- /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.34.2 +// 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, 0xcc, 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, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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 = []any{ + (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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 = []any{} + 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..3f614f17 --- /dev/null +++ b/pkg/proto/message_contents/conversation_reference.pb.go @@ -0,0 +1,215 @@ +// Holds the ConversationReference + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// 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"` + ConsentProofPayload *ConsentProofPayload `protobuf:"bytes,5,opt,name=consent_proof_payload,json=consentProofPayload,proto3" json:"consent_proof_payload,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 +} + +func (x *ConversationReference) GetConsentProofPayload() *ConsentProofPayload { + if x != nil { + return x.ConsentProofPayload + } + 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, 0x96, 0x02, 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, 0x12, 0x5e, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 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, 0x73, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x13, 0x63, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x42, 0xda, 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, 0x30, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x64, 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 = []any{ + (*ConversationReference)(nil), // 0: xmtp.message_contents.ConversationReference + (*InvitationV1_Context)(nil), // 1: xmtp.message_contents.InvitationV1.Context + (*ConsentProofPayload)(nil), // 2: xmtp.message_contents.ConsentProofPayload +} +var file_message_contents_conversation_reference_proto_depIdxs = []int32{ + 1, // 0: xmtp.message_contents.ConversationReference.context:type_name -> xmtp.message_contents.InvitationV1.Context + 2, // 1: xmtp.message_contents.ConversationReference.consent_proof_payload:type_name -> xmtp.message_contents.ConsentProofPayload + 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_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 any, i int) any { + 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..8adce52c --- /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.34.2 +// 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, 0xca, 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, 0x30, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x64, 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 = []any{ + (*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 any, i int) any { + 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 = []any{ + (*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/frames.pb.go b/pkg/proto/message_contents/frames.pb.go new file mode 100644 index 00000000..e635c35a --- /dev/null +++ b/pkg/proto/message_contents/frames.pb.go @@ -0,0 +1,363 @@ +// Signature is a generic structure for public key signatures. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: message_contents/frames.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) +) + +// The message that will be signed by the Client and returned inside the +// `action_body` field of the FrameAction message +type FrameActionBody struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The URL of the frame that was clicked + // May be different from `post_url` + FrameUrl string `protobuf:"bytes,1,opt,name=frame_url,json=frameUrl,proto3" json:"frame_url,omitempty"` + // The 1-indexed button that was clicked + ButtonIndex int32 `protobuf:"varint,2,opt,name=button_index,json=buttonIndex,proto3" json:"button_index,omitempty"` + // Timestamp of the click in milliseconds since the epoch + // + // Deprecated: Marked as deprecated in message_contents/frames.proto. + Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // A unique identifier for the conversation, not tied to anything on the + // network. Will not match the topic or conversation_id + OpaqueConversationIdentifier string `protobuf:"bytes,4,opt,name=opaque_conversation_identifier,json=opaqueConversationIdentifier,proto3" json:"opaque_conversation_identifier,omitempty"` + // Unix timestamp + UnixTimestamp uint32 `protobuf:"varint,5,opt,name=unix_timestamp,json=unixTimestamp,proto3" json:"unix_timestamp,omitempty"` + // Input text from a text input field + InputText string `protobuf:"bytes,6,opt,name=input_text,json=inputText,proto3" json:"input_text,omitempty"` + // A state serialized to a string (for example via JSON.stringify()). Maximum 4096 bytes. + State string `protobuf:"bytes,7,opt,name=state,proto3" json:"state,omitempty"` + // A 0x wallet address + Address string `protobuf:"bytes,8,opt,name=address,proto3" json:"address,omitempty"` + // A hash from a transaction + TransactionId string `protobuf:"bytes,9,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` +} + +func (x *FrameActionBody) Reset() { + *x = FrameActionBody{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_frames_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FrameActionBody) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FrameActionBody) ProtoMessage() {} + +func (x *FrameActionBody) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_frames_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 FrameActionBody.ProtoReflect.Descriptor instead. +func (*FrameActionBody) Descriptor() ([]byte, []int) { + return file_message_contents_frames_proto_rawDescGZIP(), []int{0} +} + +func (x *FrameActionBody) GetFrameUrl() string { + if x != nil { + return x.FrameUrl + } + return "" +} + +func (x *FrameActionBody) GetButtonIndex() int32 { + if x != nil { + return x.ButtonIndex + } + return 0 +} + +// Deprecated: Marked as deprecated in message_contents/frames.proto. +func (x *FrameActionBody) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *FrameActionBody) GetOpaqueConversationIdentifier() string { + if x != nil { + return x.OpaqueConversationIdentifier + } + return "" +} + +func (x *FrameActionBody) GetUnixTimestamp() uint32 { + if x != nil { + return x.UnixTimestamp + } + return 0 +} + +func (x *FrameActionBody) GetInputText() string { + if x != nil { + return x.InputText + } + return "" +} + +func (x *FrameActionBody) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *FrameActionBody) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *FrameActionBody) GetTransactionId() string { + if x != nil { + return x.TransactionId + } + return "" +} + +// The outer payload that will be sent as the `messageBytes` in the +// `trusted_data` part of the Frames message +type FrameAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signature *Signature `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // The SignedPublicKeyBundle of the signer, used to link the XMTP signature + // with a blockchain account through a chain of signatures. + SignedPublicKeyBundle *SignedPublicKeyBundle `protobuf:"bytes,2,opt,name=signed_public_key_bundle,json=signedPublicKeyBundle,proto3" json:"signed_public_key_bundle,omitempty"` + // Serialized FrameActionBody message, so that the signature verification can + // happen on a byte-perfect representation of the message + ActionBody []byte `protobuf:"bytes,3,opt,name=action_body,json=actionBody,proto3" json:"action_body,omitempty"` +} + +func (x *FrameAction) Reset() { + *x = FrameAction{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_frames_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FrameAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FrameAction) ProtoMessage() {} + +func (x *FrameAction) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_frames_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 FrameAction.ProtoReflect.Descriptor instead. +func (*FrameAction) Descriptor() ([]byte, []int) { + return file_message_contents_frames_proto_rawDescGZIP(), []int{1} +} + +func (x *FrameAction) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *FrameAction) GetSignedPublicKeyBundle() *SignedPublicKeyBundle { + if x != nil { + return x.SignedPublicKeyBundle + } + return nil +} + +func (x *FrameAction) GetActionBody() []byte { + if x != nil { + return x.ActionBody + } + return nil +} + +var File_message_contents_frames_proto protoreflect.FileDescriptor + +var file_message_contents_frames_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x66, 0x72, 0x61, 0x6d, 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, 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, 0xd6, 0x02, 0x0a, 0x0f, + 0x46, 0x72, 0x61, 0x6d, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x64, 0x79, 0x12, + 0x1b, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, + 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0b, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x20, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x44, 0x0a, 0x1e, 0x6f, 0x70, 0x61, 0x71, 0x75, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x6f, 0x70, 0x61, 0x71, 0x75, + 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x6e, 0x69, 0x78, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0d, 0x75, 0x6e, 0x69, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, + 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x65, 0x78, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, + 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xd5, 0x01, 0x0a, 0x0b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 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, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x12, 0x65, 0x0a, 0x18, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 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, 0x15, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x64, 0x79, 0x42, 0xcb, 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, 0x0b, 0x46, 0x72, 0x61, 0x6d, + 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, + 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_frames_proto_rawDescOnce sync.Once + file_message_contents_frames_proto_rawDescData = file_message_contents_frames_proto_rawDesc +) + +func file_message_contents_frames_proto_rawDescGZIP() []byte { + file_message_contents_frames_proto_rawDescOnce.Do(func() { + file_message_contents_frames_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_contents_frames_proto_rawDescData) + }) + return file_message_contents_frames_proto_rawDescData +} + +var file_message_contents_frames_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_message_contents_frames_proto_goTypes = []any{ + (*FrameActionBody)(nil), // 0: xmtp.message_contents.FrameActionBody + (*FrameAction)(nil), // 1: xmtp.message_contents.FrameAction + (*Signature)(nil), // 2: xmtp.message_contents.Signature + (*SignedPublicKeyBundle)(nil), // 3: xmtp.message_contents.SignedPublicKeyBundle +} +var file_message_contents_frames_proto_depIdxs = []int32{ + 2, // 0: xmtp.message_contents.FrameAction.signature:type_name -> xmtp.message_contents.Signature + 3, // 1: xmtp.message_contents.FrameAction.signed_public_key_bundle:type_name -> xmtp.message_contents.SignedPublicKeyBundle + 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_frames_proto_init() } +func file_message_contents_frames_proto_init() { + if File_message_contents_frames_proto != nil { + return + } + file_message_contents_public_key_proto_init() + file_message_contents_signature_proto_init() + if !protoimpl.UnsafeEnabled { + file_message_contents_frames_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*FrameActionBody); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_message_contents_frames_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*FrameAction); 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_frames_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_frames_proto_goTypes, + DependencyIndexes: file_message_contents_frames_proto_depIdxs, + MessageInfos: file_message_contents_frames_proto_msgTypes, + }.Build() + File_message_contents_frames_proto = out.File + file_message_contents_frames_proto_rawDesc = nil + file_message_contents_frames_proto_goTypes = nil + file_message_contents_frames_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..3a0e64ec --- /dev/null +++ b/pkg/proto/message_contents/invitation.pb.go @@ -0,0 +1,816 @@ +// 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.34.2 +// 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) +) + +// Version of consent proof payload +type ConsentProofPayloadVersion int32 + +const ( + ConsentProofPayloadVersion_CONSENT_PROOF_PAYLOAD_VERSION_UNSPECIFIED ConsentProofPayloadVersion = 0 + ConsentProofPayloadVersion_CONSENT_PROOF_PAYLOAD_VERSION_1 ConsentProofPayloadVersion = 1 +) + +// Enum value maps for ConsentProofPayloadVersion. +var ( + ConsentProofPayloadVersion_name = map[int32]string{ + 0: "CONSENT_PROOF_PAYLOAD_VERSION_UNSPECIFIED", + 1: "CONSENT_PROOF_PAYLOAD_VERSION_1", + } + ConsentProofPayloadVersion_value = map[string]int32{ + "CONSENT_PROOF_PAYLOAD_VERSION_UNSPECIFIED": 0, + "CONSENT_PROOF_PAYLOAD_VERSION_1": 1, + } +) + +func (x ConsentProofPayloadVersion) Enum() *ConsentProofPayloadVersion { + p := new(ConsentProofPayloadVersion) + *p = x + return p +} + +func (x ConsentProofPayloadVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConsentProofPayloadVersion) Descriptor() protoreflect.EnumDescriptor { + return file_message_contents_invitation_proto_enumTypes[0].Descriptor() +} + +func (ConsentProofPayloadVersion) Type() protoreflect.EnumType { + return &file_message_contents_invitation_proto_enumTypes[0] +} + +func (x ConsentProofPayloadVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConsentProofPayloadVersion.Descriptor instead. +func (ConsentProofPayloadVersion) EnumDescriptor() ([]byte, []int) { + return file_message_contents_invitation_proto_rawDescGZIP(), []int{0} +} + +// 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"` + // The user's consent proof + ConsentProof *ConsentProofPayload `protobuf:"bytes,4,opt,name=consent_proof,json=consentProof,proto3" json:"consent_proof,omitempty"` +} + +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 +} + +func (x *InvitationV1) GetConsentProof() *ConsentProofPayload { + if x != nil { + return x.ConsentProof + } + 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() {} + +// Payload for user's consent proof to be set in the invitation +// Signifying the conversation should be preapproved for the user on receipt +type ConsentProofPayload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the user's signature in hex format + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // approximate time when the user signed + Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // version of the payload + PayloadVersion ConsentProofPayloadVersion `protobuf:"varint,3,opt,name=payload_version,json=payloadVersion,proto3,enum=xmtp.message_contents.ConsentProofPayloadVersion" json:"payload_version,omitempty"` +} + +func (x *ConsentProofPayload) Reset() { + *x = ConsentProofPayload{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_invitation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConsentProofPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConsentProofPayload) ProtoMessage() {} + +func (x *ConsentProofPayload) 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 ConsentProofPayload.ProtoReflect.Descriptor instead. +func (*ConsentProofPayload) Descriptor() ([]byte, []int) { + return file_message_contents_invitation_proto_rawDescGZIP(), []int{4} +} + +func (x *ConsentProofPayload) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *ConsentProofPayload) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *ConsentProofPayload) GetPayloadVersion() ConsentProofPayloadVersion { + if x != nil { + return x.PayloadVersion + } + return ConsentProofPayloadVersion_CONSENT_PROOF_PAYLOAD_VERSION_UNSPECIFIED +} + +// 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[5] + 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[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_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[6] + 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[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 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, 0xbd, 0x04, 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, 0x12, 0x4f, + 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x73, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 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, 0x22, 0xad, 0x01, 0x0a, + 0x13, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x5a, 0x0a, 0x0f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 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, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x70, 0x0a, 0x1a, + 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x29, 0x43, 0x4f, + 0x4e, 0x53, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x50, 0x41, 0x59, 0x4c, + 0x4f, 0x41, 0x44, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x4f, 0x4e, + 0x53, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x4f, 0x46, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, + 0x41, 0x44, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x10, 0x01, 0x42, 0xcf, + 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, + 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, + 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_message_contents_invitation_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_message_contents_invitation_proto_goTypes = []any{ + (ConsentProofPayloadVersion)(0), // 0: xmtp.message_contents.ConsentProofPayloadVersion + (*InvitationV1)(nil), // 1: xmtp.message_contents.InvitationV1 + (*SealedInvitationHeaderV1)(nil), // 2: xmtp.message_contents.SealedInvitationHeaderV1 + (*SealedInvitationV1)(nil), // 3: xmtp.message_contents.SealedInvitationV1 + (*SealedInvitation)(nil), // 4: xmtp.message_contents.SealedInvitation + (*ConsentProofPayload)(nil), // 5: xmtp.message_contents.ConsentProofPayload + (*InvitationV1_Aes256GcmHkdfsha256)(nil), // 6: xmtp.message_contents.InvitationV1.Aes256gcmHkdfsha256 + (*InvitationV1_Context)(nil), // 7: xmtp.message_contents.InvitationV1.Context + nil, // 8: xmtp.message_contents.InvitationV1.Context.MetadataEntry + (*SignedPublicKeyBundle)(nil), // 9: xmtp.message_contents.SignedPublicKeyBundle + (*Ciphertext)(nil), // 10: xmtp.message_contents.Ciphertext +} +var file_message_contents_invitation_proto_depIdxs = []int32{ + 7, // 0: xmtp.message_contents.InvitationV1.context:type_name -> xmtp.message_contents.InvitationV1.Context + 6, // 1: xmtp.message_contents.InvitationV1.aes256_gcm_hkdf_sha256:type_name -> xmtp.message_contents.InvitationV1.Aes256gcmHkdfsha256 + 5, // 2: xmtp.message_contents.InvitationV1.consent_proof:type_name -> xmtp.message_contents.ConsentProofPayload + 9, // 3: xmtp.message_contents.SealedInvitationHeaderV1.sender:type_name -> xmtp.message_contents.SignedPublicKeyBundle + 9, // 4: xmtp.message_contents.SealedInvitationHeaderV1.recipient:type_name -> xmtp.message_contents.SignedPublicKeyBundle + 10, // 5: xmtp.message_contents.SealedInvitationV1.ciphertext:type_name -> xmtp.message_contents.Ciphertext + 3, // 6: xmtp.message_contents.SealedInvitation.v1:type_name -> xmtp.message_contents.SealedInvitationV1 + 0, // 7: xmtp.message_contents.ConsentProofPayload.payload_version:type_name -> xmtp.message_contents.ConsentProofPayloadVersion + 8, // 8: xmtp.message_contents.InvitationV1.Context.metadata:type_name -> xmtp.message_contents.InvitationV1.Context.MetadataEntry + 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_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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + switch v := v.(*ConsentProofPayload); 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 any, i int) any { + 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[6].Exporter = func(v any, i int) any { + 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 = []any{ + (*InvitationV1_Aes256GcmHkdfSha256)(nil), + } + file_message_contents_invitation_proto_msgTypes[3].OneofWrappers = []any{ + (*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: 1, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_message_contents_invitation_proto_goTypes, + DependencyIndexes: file_message_contents_invitation_proto_depIdxs, + EnumInfos: file_message_contents_invitation_proto_enumTypes, + 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..aad2e1d8 --- /dev/null +++ b/pkg/proto/message_contents/message.pb.go @@ -0,0 +1,718 @@ +// Messages used for transport and storage of user conversations. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// 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 + + // encapsulates encoded MessageHeaderV1 + HeaderBytes []byte `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` + // Ciphertext.payload MUST contain encrypted EncodedContent + Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` +} + +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 + + // encapsulates encoded MessageHeaderV2 + HeaderBytes []byte `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` + // Ciphertext.payload MUST contain encrypted SignedContent + Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` + // HMAC of the message ciphertext, with the HMAC key derived from the topic + // key + SenderHmac []byte `protobuf:"bytes,3,opt,name=sender_hmac,json=senderHmac,proto3,oneof" json:"sender_hmac,omitempty"` + // Flag indicating whether the message should be pushed from a notification + // server + ShouldPush *bool `protobuf:"varint,4,opt,name=should_push,json=shouldPush,proto3,oneof" json:"should_push,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 +} + +func (x *MessageV2) GetSenderHmac() []byte { + if x != nil { + return x.SenderHmac + } + return nil +} + +func (x *MessageV2) GetShouldPush() bool { + if x != nil && x.ShouldPush != nil { + return *x.ShouldPush + } + return false +} + +// 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, + 0xdd, 0x01, 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, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x6d, + 0x61, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x48, 0x6d, 0x61, 0x63, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x68, 0x6f, + 0x75, 0x6c, 0x64, 0x5f, 0x70, 0x75, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, + 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x50, 0x75, 0x73, 0x68, 0x88, 0x01, 0x01, 0x42, + 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x6d, 0x61, 0x63, 0x42, + 0x0e, 0x0a, 0x0c, 0x5f, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x5f, 0x70, 0x75, 0x73, 0x68, 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, 0xcc, 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, 0x30, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, + 0x70, 0x64, 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 = []any{ + (*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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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[3].OneofWrappers = []any{} + file_message_contents_message_proto_msgTypes[4].OneofWrappers = []any{ + (*Message_V1)(nil), + (*Message_V2)(nil), + } + file_message_contents_message_proto_msgTypes[5].OneofWrappers = []any{} + 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..e2d73943 --- /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.34.2 +// 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, 0xcf, 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, 0x30, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, + 0x74, 0x70, 0x64, 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 = []any{ + (*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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 = []any{ + (*SignedPrivateKey_Secp256K1_)(nil), + } + file_message_contents_private_key_proto_msgTypes[2].OneofWrappers = []any{ + (*PrivateKey_Secp256K1_)(nil), + } + file_message_contents_private_key_proto_msgTypes[4].OneofWrappers = []any{ + (*PrivateKeyBundle_V1)(nil), + (*PrivateKeyBundle_V2)(nil), + } + file_message_contents_private_key_proto_msgTypes[6].OneofWrappers = []any{ + (*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..5bf8e0b1 --- /dev/null +++ b/pkg/proto/message_contents/private_preferences.pb.go @@ -0,0 +1,790 @@ +// 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.34.2 +// 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. +type PrivatePreferencesAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to MessageType: + // + // *PrivatePreferencesAction_AllowAddress_ + // *PrivatePreferencesAction_DenyAddress_ + // *PrivatePreferencesAction_AllowGroup_ + // *PrivatePreferencesAction_DenyGroup_ + // *PrivatePreferencesAction_AllowInboxId_ + // *PrivatePreferencesAction_DenyInboxId_ + 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) GetAllowAddress() *PrivatePreferencesAction_AllowAddress { + if x, ok := x.GetMessageType().(*PrivatePreferencesAction_AllowAddress_); ok { + return x.AllowAddress + } + return nil +} + +func (x *PrivatePreferencesAction) GetDenyAddress() *PrivatePreferencesAction_DenyAddress { + if x, ok := x.GetMessageType().(*PrivatePreferencesAction_DenyAddress_); ok { + return x.DenyAddress + } + return nil +} + +func (x *PrivatePreferencesAction) GetAllowGroup() *PrivatePreferencesAction_AllowGroup { + if x, ok := x.GetMessageType().(*PrivatePreferencesAction_AllowGroup_); ok { + return x.AllowGroup + } + return nil +} + +func (x *PrivatePreferencesAction) GetDenyGroup() *PrivatePreferencesAction_DenyGroup { + if x, ok := x.GetMessageType().(*PrivatePreferencesAction_DenyGroup_); ok { + return x.DenyGroup + } + return nil +} + +func (x *PrivatePreferencesAction) GetAllowInboxId() *PrivatePreferencesAction_AllowInboxId { + if x, ok := x.GetMessageType().(*PrivatePreferencesAction_AllowInboxId_); ok { + return x.AllowInboxId + } + return nil +} + +func (x *PrivatePreferencesAction) GetDenyInboxId() *PrivatePreferencesAction_DenyInboxId { + if x, ok := x.GetMessageType().(*PrivatePreferencesAction_DenyInboxId_); ok { + return x.DenyInboxId + } + return nil +} + +type isPrivatePreferencesAction_MessageType interface { + isPrivatePreferencesAction_MessageType() +} + +type PrivatePreferencesAction_AllowAddress_ struct { + AllowAddress *PrivatePreferencesAction_AllowAddress `protobuf:"bytes,1,opt,name=allow_address,json=allowAddress,proto3,oneof"` +} + +type PrivatePreferencesAction_DenyAddress_ struct { + DenyAddress *PrivatePreferencesAction_DenyAddress `protobuf:"bytes,2,opt,name=deny_address,json=denyAddress,proto3,oneof"` +} + +type PrivatePreferencesAction_AllowGroup_ struct { + AllowGroup *PrivatePreferencesAction_AllowGroup `protobuf:"bytes,3,opt,name=allow_group,json=allowGroup,proto3,oneof"` +} + +type PrivatePreferencesAction_DenyGroup_ struct { + DenyGroup *PrivatePreferencesAction_DenyGroup `protobuf:"bytes,4,opt,name=deny_group,json=denyGroup,proto3,oneof"` +} + +type PrivatePreferencesAction_AllowInboxId_ struct { + AllowInboxId *PrivatePreferencesAction_AllowInboxId `protobuf:"bytes,5,opt,name=allow_inbox_id,json=allowInboxId,proto3,oneof"` +} + +type PrivatePreferencesAction_DenyInboxId_ struct { + DenyInboxId *PrivatePreferencesAction_DenyInboxId `protobuf:"bytes,6,opt,name=deny_inbox_id,json=denyInboxId,proto3,oneof"` +} + +func (*PrivatePreferencesAction_AllowAddress_) isPrivatePreferencesAction_MessageType() {} + +func (*PrivatePreferencesAction_DenyAddress_) isPrivatePreferencesAction_MessageType() {} + +func (*PrivatePreferencesAction_AllowGroup_) isPrivatePreferencesAction_MessageType() {} + +func (*PrivatePreferencesAction_DenyGroup_) isPrivatePreferencesAction_MessageType() {} + +func (*PrivatePreferencesAction_AllowInboxId_) isPrivatePreferencesAction_MessageType() {} + +func (*PrivatePreferencesAction_DenyInboxId_) 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() {} + +// Allow 1:1 direct message (DM) access +type PrivatePreferencesAction_AllowAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Add the given wallet addresses to the allow list + WalletAddresses []string `protobuf:"bytes,1,rep,name=wallet_addresses,json=walletAddresses,proto3" json:"wallet_addresses,omitempty"` +} + +func (x *PrivatePreferencesAction_AllowAddress) Reset() { + *x = PrivatePreferencesAction_AllowAddress{} + 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_AllowAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivatePreferencesAction_AllowAddress) ProtoMessage() {} + +func (x *PrivatePreferencesAction_AllowAddress) 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_AllowAddress.ProtoReflect.Descriptor instead. +func (*PrivatePreferencesAction_AllowAddress) Descriptor() ([]byte, []int) { + return file_message_contents_private_preferences_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *PrivatePreferencesAction_AllowAddress) GetWalletAddresses() []string { + if x != nil { + return x.WalletAddresses + } + return nil +} + +// Deny (block) 1:1 direct message (DM) access +type PrivatePreferencesAction_DenyAddress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Add the given wallet addresses to the deny list + WalletAddresses []string `protobuf:"bytes,1,rep,name=wallet_addresses,json=walletAddresses,proto3" json:"wallet_addresses,omitempty"` +} + +func (x *PrivatePreferencesAction_DenyAddress) Reset() { + *x = PrivatePreferencesAction_DenyAddress{} + 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_DenyAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivatePreferencesAction_DenyAddress) ProtoMessage() {} + +func (x *PrivatePreferencesAction_DenyAddress) 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_DenyAddress.ProtoReflect.Descriptor instead. +func (*PrivatePreferencesAction_DenyAddress) Descriptor() ([]byte, []int) { + return file_message_contents_private_preferences_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *PrivatePreferencesAction_DenyAddress) GetWalletAddresses() []string { + if x != nil { + return x.WalletAddresses + } + return nil +} + +// Allow V3 1:1 direct message (DM) access +type PrivatePreferencesAction_AllowInboxId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Add the given inbox id to the allow list + InboxIds []string `protobuf:"bytes,1,rep,name=inbox_ids,json=inboxIds,proto3" json:"inbox_ids,omitempty"` +} + +func (x *PrivatePreferencesAction_AllowInboxId) Reset() { + *x = PrivatePreferencesAction_AllowInboxId{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_preferences_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivatePreferencesAction_AllowInboxId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivatePreferencesAction_AllowInboxId) ProtoMessage() {} + +func (x *PrivatePreferencesAction_AllowInboxId) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_preferences_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 PrivatePreferencesAction_AllowInboxId.ProtoReflect.Descriptor instead. +func (*PrivatePreferencesAction_AllowInboxId) Descriptor() ([]byte, []int) { + return file_message_contents_private_preferences_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *PrivatePreferencesAction_AllowInboxId) GetInboxIds() []string { + if x != nil { + return x.InboxIds + } + return nil +} + +// Deny (block) V3 1:1 direct message (DM) access +type PrivatePreferencesAction_DenyInboxId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Add the given inbox id to the deny list + InboxIds []string `protobuf:"bytes,1,rep,name=inbox_ids,json=inboxIds,proto3" json:"inbox_ids,omitempty"` +} + +func (x *PrivatePreferencesAction_DenyInboxId) Reset() { + *x = PrivatePreferencesAction_DenyInboxId{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_preferences_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivatePreferencesAction_DenyInboxId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivatePreferencesAction_DenyInboxId) ProtoMessage() {} + +func (x *PrivatePreferencesAction_DenyInboxId) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_preferences_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 PrivatePreferencesAction_DenyInboxId.ProtoReflect.Descriptor instead. +func (*PrivatePreferencesAction_DenyInboxId) Descriptor() ([]byte, []int) { + return file_message_contents_private_preferences_proto_rawDescGZIP(), []int{0, 3} +} + +func (x *PrivatePreferencesAction_DenyInboxId) GetInboxIds() []string { + if x != nil { + return x.InboxIds + } + return nil +} + +// Allow Group access +type PrivatePreferencesAction_AllowGroup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Add the given group_ids to the allow list + GroupIds [][]byte `protobuf:"bytes,1,rep,name=group_ids,json=groupIds,proto3" json:"group_ids,omitempty"` +} + +func (x *PrivatePreferencesAction_AllowGroup) Reset() { + *x = PrivatePreferencesAction_AllowGroup{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_preferences_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivatePreferencesAction_AllowGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivatePreferencesAction_AllowGroup) ProtoMessage() {} + +func (x *PrivatePreferencesAction_AllowGroup) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_preferences_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 PrivatePreferencesAction_AllowGroup.ProtoReflect.Descriptor instead. +func (*PrivatePreferencesAction_AllowGroup) Descriptor() ([]byte, []int) { + return file_message_contents_private_preferences_proto_rawDescGZIP(), []int{0, 4} +} + +func (x *PrivatePreferencesAction_AllowGroup) GetGroupIds() [][]byte { + if x != nil { + return x.GroupIds + } + return nil +} + +// Deny (deny) Group access +type PrivatePreferencesAction_DenyGroup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Add the given group_ids to the deny list + GroupIds [][]byte `protobuf:"bytes,1,rep,name=group_ids,json=groupIds,proto3" json:"group_ids,omitempty"` +} + +func (x *PrivatePreferencesAction_DenyGroup) Reset() { + *x = PrivatePreferencesAction_DenyGroup{} + if protoimpl.UnsafeEnabled { + mi := &file_message_contents_private_preferences_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivatePreferencesAction_DenyGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivatePreferencesAction_DenyGroup) ProtoMessage() {} + +func (x *PrivatePreferencesAction_DenyGroup) ProtoReflect() protoreflect.Message { + mi := &file_message_contents_private_preferences_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 PrivatePreferencesAction_DenyGroup.ProtoReflect.Descriptor instead. +func (*PrivatePreferencesAction_DenyGroup) Descriptor() ([]byte, []int) { + return file_message_contents_private_preferences_proto_rawDescGZIP(), []int{0, 5} +} + +func (x *PrivatePreferencesAction_DenyGroup) GetGroupIds() [][]byte { + if x != nil { + return x.GroupIds + } + 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, 0x98, 0x07, 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, 0x63, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 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, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x60, 0x0a, 0x0c, 0x64, 0x65, 0x6e, 0x79, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, + 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, + 0x44, 0x65, 0x6e, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x64, + 0x65, 0x6e, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x5d, 0x0a, 0x0b, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3a, 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, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x00, 0x52, 0x0a, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x5a, 0x0a, 0x0a, 0x64, 0x65, 0x6e, + 0x79, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 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, 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, 0x44, + 0x65, 0x6e, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x00, 0x52, 0x09, 0x64, 0x65, 0x6e, 0x79, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x64, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x69, + 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 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, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x61, 0x0a, 0x0d, 0x64, + 0x65, 0x6e, 0x79, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3b, 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, 0x44, 0x65, 0x6e, 0x79, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x48, + 0x00, 0x52, 0x0b, 0x64, 0x65, 0x6e, 0x79, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x1a, 0x39, + 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 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, 0x38, 0x0a, 0x0b, 0x44, 0x65, 0x6e, + 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 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, 0x2b, 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x62, 0x6f, + 0x78, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x73, + 0x1a, 0x2a, 0x0a, 0x0b, 0x44, 0x65, 0x6e, 0x79, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, + 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x73, 0x1a, 0x29, 0x0a, 0x0a, + 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x73, 0x1a, 0x28, 0x0a, 0x09, 0x44, 0x65, 0x6e, 0x79, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, + 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, 0xd7, + 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, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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, 8) +var file_message_contents_private_preferences_proto_goTypes = []any{ + (*PrivatePreferencesAction)(nil), // 0: xmtp.message_contents.PrivatePreferencesAction + (*PrivatePreferencesPayload)(nil), // 1: xmtp.message_contents.PrivatePreferencesPayload + (*PrivatePreferencesAction_AllowAddress)(nil), // 2: xmtp.message_contents.PrivatePreferencesAction.AllowAddress + (*PrivatePreferencesAction_DenyAddress)(nil), // 3: xmtp.message_contents.PrivatePreferencesAction.DenyAddress + (*PrivatePreferencesAction_AllowInboxId)(nil), // 4: xmtp.message_contents.PrivatePreferencesAction.AllowInboxId + (*PrivatePreferencesAction_DenyInboxId)(nil), // 5: xmtp.message_contents.PrivatePreferencesAction.DenyInboxId + (*PrivatePreferencesAction_AllowGroup)(nil), // 6: xmtp.message_contents.PrivatePreferencesAction.AllowGroup + (*PrivatePreferencesAction_DenyGroup)(nil), // 7: xmtp.message_contents.PrivatePreferencesAction.DenyGroup + (*Ciphertext)(nil), // 8: xmtp.message_contents.Ciphertext +} +var file_message_contents_private_preferences_proto_depIdxs = []int32{ + 2, // 0: xmtp.message_contents.PrivatePreferencesAction.allow_address:type_name -> xmtp.message_contents.PrivatePreferencesAction.AllowAddress + 3, // 1: xmtp.message_contents.PrivatePreferencesAction.deny_address:type_name -> xmtp.message_contents.PrivatePreferencesAction.DenyAddress + 6, // 2: xmtp.message_contents.PrivatePreferencesAction.allow_group:type_name -> xmtp.message_contents.PrivatePreferencesAction.AllowGroup + 7, // 3: xmtp.message_contents.PrivatePreferencesAction.deny_group:type_name -> xmtp.message_contents.PrivatePreferencesAction.DenyGroup + 4, // 4: xmtp.message_contents.PrivatePreferencesAction.allow_inbox_id:type_name -> xmtp.message_contents.PrivatePreferencesAction.AllowInboxId + 5, // 5: xmtp.message_contents.PrivatePreferencesAction.deny_inbox_id:type_name -> xmtp.message_contents.PrivatePreferencesAction.DenyInboxId + 8, // 6: xmtp.message_contents.PrivatePreferencesPayload.v1:type_name -> xmtp.message_contents.Ciphertext + 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_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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + switch v := v.(*PrivatePreferencesAction_AllowAddress); 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 any, i int) any { + switch v := v.(*PrivatePreferencesAction_DenyAddress); 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[4].Exporter = func(v any, i int) any { + switch v := v.(*PrivatePreferencesAction_AllowInboxId); 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[5].Exporter = func(v any, i int) any { + switch v := v.(*PrivatePreferencesAction_DenyInboxId); 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[6].Exporter = func(v any, i int) any { + switch v := v.(*PrivatePreferencesAction_AllowGroup); 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[7].Exporter = func(v any, i int) any { + switch v := v.(*PrivatePreferencesAction_DenyGroup); 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 = []any{ + (*PrivatePreferencesAction_AllowAddress_)(nil), + (*PrivatePreferencesAction_DenyAddress_)(nil), + (*PrivatePreferencesAction_AllowGroup_)(nil), + (*PrivatePreferencesAction_DenyGroup_)(nil), + (*PrivatePreferencesAction_AllowInboxId_)(nil), + (*PrivatePreferencesAction_DenyInboxId_)(nil), + } + file_message_contents_private_preferences_proto_msgTypes[1].OneofWrappers = []any{ + (*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: 8, + 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..5e4ec91d --- /dev/null +++ b/pkg/proto/message_contents/public_key.pb.go @@ -0,0 +1,698 @@ +// 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.34.2 +// 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, 0xce, 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, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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 = []any{ + (*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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 = []any{ + (*UnsignedPublicKey_Secp256K1Uncompressed_)(nil), + } + file_message_contents_public_key_proto_msgTypes[3].OneofWrappers = []any{ + (*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..fff4e02f --- /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.34.2 +// 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, 0xce, 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, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, + 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 = []any{ + (*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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 = []any{ + (*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..b3921509 --- /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.34.2 +// 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, 0xd2, 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, + 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, + 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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 = []any{ + (*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 any, i int) any { + 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..a377a210 --- /dev/null +++ b/pkg/proto/mls/api/v1/mls.pb.go @@ -0,0 +1,2907 @@ +// Message API + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// 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/xmtpd/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"` + IsInboxIdCredential bool `protobuf:"varint,2,opt,name=is_inbox_id_credential,json=isInboxIdCredential,proto3" json:"is_inbox_id_credential,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 +} + +func (x *RegisterInstallationRequest) GetIsInboxIdCredential() bool { + if x != nil { + return x.IsInboxIdCredential + } + return false +} + +// 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"` + IsInboxIdCredential bool `protobuf:"varint,2,opt,name=is_inbox_id_credential,json=isInboxIdCredential,proto3" json:"is_inbox_id_credential,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 +} + +func (x *UploadKeyPackageRequest) GetIsInboxIdCredential() bool { + if x != nil { + return x.IsInboxIdCredential + } + return false +} + +// 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"` + HpkePublicKey []byte `protobuf:"bytes,5,opt,name=hpke_public_key,json=hpkePublicKey,proto3" json:"hpke_public_key,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 +} + +func (x *WelcomeMessage_V1) GetHpkePublicKey() []byte { + if x != nil { + return x.HpkePublicKey + } + 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"` + HpkePublicKey []byte `protobuf:"bytes,3,opt,name=hpke_public_key,json=hpkePublicKey,proto3" json:"hpke_public_key,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 +} + +func (x *WelcomeMessageInput_V1) GetHpkePublicKey() []byte { + if x != nil { + return x.HpkePublicKey + } + 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"` + SenderHmac []byte `protobuf:"bytes,5,opt,name=sender_hmac,json=senderHmac,proto3" json:"sender_hmac,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 +} + +func (x *GroupMessage_V1) GetSenderHmac() []byte { + if x != nil { + return x.SenderHmac + } + 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"` // Serialized MlsProtocolMessage + SenderHmac []byte `protobuf:"bytes,2,opt,name=sender_hmac,json=senderHmac,proto3" json:"sender_hmac,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 +} + +func (x *GroupMessageInput_V1) GetSenderHmac() []byte { + if x != nil { + return x.SenderHmac + } + 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, 0xee, 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, 0x9a, 0x01, + 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, 0x12, 0x26, 0x0a, 0x0f, 0x68, 0x70, 0x6b, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x68, 0x70, 0x6b, + 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xc8, 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, 0x6b, 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, 0x12, 0x26, 0x0a, + 0x0f, 0x68, 0x70, 0x6b, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x68, 0x70, 0x6b, 0x65, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0xd3, 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, 0x83, 0x01, 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, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x6d, 0x61, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x6d, 0x61, 0x63, 0x42, 0x09, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x92, 0x01, 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, 0x39, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x6d, 0x61, 0x63, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x6d, 0x61, 0x63, + 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, 0x96, 0x01, 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, 0x12, 0x33, 0x0a, 0x16, + 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x69, 0x73, + 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 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, 0x92, 0x01, 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, 0x12, 0x33, 0x0a, 0x16, + 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x69, 0x73, + 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 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, 0xc2, + 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, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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 = []any{ + (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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 = []any{ + (*WelcomeMessage_V1_)(nil), + } + file_mls_api_v1_mls_proto_msgTypes[1].OneofWrappers = []any{ + (*WelcomeMessageInput_V1_)(nil), + } + file_mls_api_v1_mls_proto_msgTypes[2].OneofWrappers = []any{ + (*GroupMessage_V1_)(nil), + } + file_mls_api_v1_mls_proto_msgTypes[3].OneofWrappers = []any{ + (*GroupMessageInput_V1_)(nil), + } + file_mls_api_v1_mls_proto_msgTypes[29].OneofWrappers = []any{ + (*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..aab315e9 --- /dev/null +++ b/pkg/proto/mls/database/intents.pb.go @@ -0,0 +1,1649 @@ +// V3 invite message structure + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// 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) +) + +// Type of update to admin lists +type AdminListUpdateType int32 + +const ( + AdminListUpdateType_ADMIN_LIST_UPDATE_TYPE_UNSPECIFIED AdminListUpdateType = 0 + AdminListUpdateType_ADMIN_LIST_UPDATE_TYPE_ADD_ADMIN AdminListUpdateType = 1 + AdminListUpdateType_ADMIN_LIST_UPDATE_TYPE_REMOVE_ADMIN AdminListUpdateType = 2 + AdminListUpdateType_ADMIN_LIST_UPDATE_TYPE_ADD_SUPER_ADMIN AdminListUpdateType = 3 + AdminListUpdateType_ADMIN_LIST_UPDATE_TYPE_REMOVE_SUPER_ADMIN AdminListUpdateType = 4 +) + +// Enum value maps for AdminListUpdateType. +var ( + AdminListUpdateType_name = map[int32]string{ + 0: "ADMIN_LIST_UPDATE_TYPE_UNSPECIFIED", + 1: "ADMIN_LIST_UPDATE_TYPE_ADD_ADMIN", + 2: "ADMIN_LIST_UPDATE_TYPE_REMOVE_ADMIN", + 3: "ADMIN_LIST_UPDATE_TYPE_ADD_SUPER_ADMIN", + 4: "ADMIN_LIST_UPDATE_TYPE_REMOVE_SUPER_ADMIN", + } + AdminListUpdateType_value = map[string]int32{ + "ADMIN_LIST_UPDATE_TYPE_UNSPECIFIED": 0, + "ADMIN_LIST_UPDATE_TYPE_ADD_ADMIN": 1, + "ADMIN_LIST_UPDATE_TYPE_REMOVE_ADMIN": 2, + "ADMIN_LIST_UPDATE_TYPE_ADD_SUPER_ADMIN": 3, + "ADMIN_LIST_UPDATE_TYPE_REMOVE_SUPER_ADMIN": 4, + } +) + +func (x AdminListUpdateType) Enum() *AdminListUpdateType { + p := new(AdminListUpdateType) + *p = x + return p +} + +func (x AdminListUpdateType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AdminListUpdateType) Descriptor() protoreflect.EnumDescriptor { + return file_mls_database_intents_proto_enumTypes[0].Descriptor() +} + +func (AdminListUpdateType) Type() protoreflect.EnumType { + return &file_mls_database_intents_proto_enumTypes[0] +} + +func (x AdminListUpdateType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AdminListUpdateType.Descriptor instead. +func (AdminListUpdateType) EnumDescriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{0} +} + +// 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() {} + +// The data required to make a commit that updates group membership +// Handles both Add and Remove actions +type UpdateGroupMembershipData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *UpdateGroupMembershipData_V1_ + Version isUpdateGroupMembershipData_Version `protobuf_oneof:"version"` +} + +func (x *UpdateGroupMembershipData) Reset() { + *x = UpdateGroupMembershipData{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGroupMembershipData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGroupMembershipData) ProtoMessage() {} + +func (x *UpdateGroupMembershipData) 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 UpdateGroupMembershipData.ProtoReflect.Descriptor instead. +func (*UpdateGroupMembershipData) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{6} +} + +func (m *UpdateGroupMembershipData) GetVersion() isUpdateGroupMembershipData_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *UpdateGroupMembershipData) GetV1() *UpdateGroupMembershipData_V1 { + if x, ok := x.GetVersion().(*UpdateGroupMembershipData_V1_); ok { + return x.V1 + } + return nil +} + +type isUpdateGroupMembershipData_Version interface { + isUpdateGroupMembershipData_Version() +} + +type UpdateGroupMembershipData_V1_ struct { + V1 *UpdateGroupMembershipData_V1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*UpdateGroupMembershipData_V1_) isUpdateGroupMembershipData_Version() {} + +// The data required to update group metadata +type UpdateMetadataData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *UpdateMetadataData_V1_ + Version isUpdateMetadataData_Version `protobuf_oneof:"version"` +} + +func (x *UpdateMetadataData) Reset() { + *x = UpdateMetadataData{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateMetadataData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMetadataData) ProtoMessage() {} + +func (x *UpdateMetadataData) 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 UpdateMetadataData.ProtoReflect.Descriptor instead. +func (*UpdateMetadataData) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{7} +} + +func (m *UpdateMetadataData) GetVersion() isUpdateMetadataData_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *UpdateMetadataData) GetV1() *UpdateMetadataData_V1 { + if x, ok := x.GetVersion().(*UpdateMetadataData_V1_); ok { + return x.V1 + } + return nil +} + +type isUpdateMetadataData_Version interface { + isUpdateMetadataData_Version() +} + +type UpdateMetadataData_V1_ struct { + V1 *UpdateMetadataData_V1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*UpdateMetadataData_V1_) isUpdateMetadataData_Version() {} + +// The data required to update group admin/super admin lists +type UpdateAdminListsData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Version: + // + // *UpdateAdminListsData_V1_ + Version isUpdateAdminListsData_Version `protobuf_oneof:"version"` +} + +func (x *UpdateAdminListsData) Reset() { + *x = UpdateAdminListsData{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAdminListsData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAdminListsData) ProtoMessage() {} + +func (x *UpdateAdminListsData) 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 UpdateAdminListsData.ProtoReflect.Descriptor instead. +func (*UpdateAdminListsData) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{8} +} + +func (m *UpdateAdminListsData) GetVersion() isUpdateAdminListsData_Version { + if m != nil { + return m.Version + } + return nil +} + +func (x *UpdateAdminListsData) GetV1() *UpdateAdminListsData_V1 { + if x, ok := x.GetVersion().(*UpdateAdminListsData_V1_); ok { + return x.V1 + } + return nil +} + +type isUpdateAdminListsData_Version interface { + isUpdateAdminListsData_Version() +} + +type UpdateAdminListsData_V1_ struct { + V1 *UpdateAdminListsData_V1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +func (*UpdateAdminListsData_V1_) isUpdateAdminListsData_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[9] + 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[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 PostCommitAction.ProtoReflect.Descriptor instead. +func (*PostCommitAction) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{9} +} + +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[10] + 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[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 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[11] + 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[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 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[12] + 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[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 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 +} + +// V1 of UpdateGroupMembershipPublishData +type UpdateGroupMembershipData_V1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Contains delta of membership updates that need to be applied + MembershipUpdates map[string]uint64 `protobuf:"bytes,1,rep,name=membership_updates,json=membershipUpdates,proto3" json:"membership_updates,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + // Contains the list of members that will be removed + RemovedMembers []string `protobuf:"bytes,2,rep,name=removed_members,json=removedMembers,proto3" json:"removed_members,omitempty"` +} + +func (x *UpdateGroupMembershipData_V1) Reset() { + *x = UpdateGroupMembershipData_V1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGroupMembershipData_V1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGroupMembershipData_V1) ProtoMessage() {} + +func (x *UpdateGroupMembershipData_V1) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_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 UpdateGroupMembershipData_V1.ProtoReflect.Descriptor instead. +func (*UpdateGroupMembershipData_V1) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *UpdateGroupMembershipData_V1) GetMembershipUpdates() map[string]uint64 { + if x != nil { + return x.MembershipUpdates + } + return nil +} + +func (x *UpdateGroupMembershipData_V1) GetRemovedMembers() []string { + if x != nil { + return x.RemovedMembers + } + return nil +} + +// V1 of UpdateMetadataPublishData +type UpdateMetadataData_V1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FieldName string `protobuf:"bytes,1,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"` + FieldValue string `protobuf:"bytes,2,opt,name=field_value,json=fieldValue,proto3" json:"field_value,omitempty"` +} + +func (x *UpdateMetadataData_V1) Reset() { + *x = UpdateMetadataData_V1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateMetadataData_V1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateMetadataData_V1) ProtoMessage() {} + +func (x *UpdateMetadataData_V1) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_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 UpdateMetadataData_V1.ProtoReflect.Descriptor instead. +func (*UpdateMetadataData_V1) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *UpdateMetadataData_V1) GetFieldName() string { + if x != nil { + return x.FieldName + } + return "" +} + +func (x *UpdateMetadataData_V1) GetFieldValue() string { + if x != nil { + return x.FieldValue + } + return "" +} + +// V1 of UpdateAdminListsPublishData +type UpdateAdminListsData_V1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AdminListUpdateType AdminListUpdateType `protobuf:"varint,1,opt,name=admin_list_update_type,json=adminListUpdateType,proto3,enum=xmtp.mls.database.AdminListUpdateType" json:"admin_list_update_type,omitempty"` + InboxId string `protobuf:"bytes,2,opt,name=inbox_id,json=inboxId,proto3" json:"inbox_id,omitempty"` +} + +func (x *UpdateAdminListsData_V1) Reset() { + *x = UpdateAdminListsData_V1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAdminListsData_V1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAdminListsData_V1) ProtoMessage() {} + +func (x *UpdateAdminListsData_V1) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_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 UpdateAdminListsData_V1.ProtoReflect.Descriptor instead. +func (*UpdateAdminListsData_V1) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *UpdateAdminListsData_V1) GetAdminListUpdateType() AdminListUpdateType { + if x != nil { + return x.AdminListUpdateType + } + return AdminListUpdateType_ADMIN_LIST_UPDATE_TYPE_UNSPECIFIED +} + +func (x *UpdateAdminListsData_V1) GetInboxId() string { + if x != nil { + return x.InboxId + } + return "" +} + +// An installation +type PostCommitAction_Installation 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"` + HpkePublicKey []byte `protobuf:"bytes,2,opt,name=hpke_public_key,json=hpkePublicKey,proto3" json:"hpke_public_key,omitempty"` +} + +func (x *PostCommitAction_Installation) Reset() { + *x = PostCommitAction_Installation{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_database_intents_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PostCommitAction_Installation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostCommitAction_Installation) ProtoMessage() {} + +func (x *PostCommitAction_Installation) ProtoReflect() protoreflect.Message { + mi := &file_mls_database_intents_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 PostCommitAction_Installation.ProtoReflect.Descriptor instead. +func (*PostCommitAction_Installation) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{9, 0} +} + +func (x *PostCommitAction_Installation) GetInstallationKey() []byte { + if x != nil { + return x.InstallationKey + } + return nil +} + +func (x *PostCommitAction_Installation) GetHpkePublicKey() []byte { + if x != nil { + return x.HpkePublicKey + } + return nil +} + +// SendWelcome message +type PostCommitAction_SendWelcomes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Installations []*PostCommitAction_Installation `protobuf:"bytes,1,rep,name=installations,proto3" json:"installations,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[18] + 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[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 PostCommitAction_SendWelcomes.ProtoReflect.Descriptor instead. +func (*PostCommitAction_SendWelcomes) Descriptor() ([]byte, []int) { + return file_mls_database_intents_proto_rawDescGZIP(), []int{9, 1} +} + +func (x *PostCommitAction_SendWelcomes) GetInstallations() []*PostCommitAction_Installation { + if x != nil { + return x.Installations + } + 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, 0xd6, 0x02, 0x0a, 0x19, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, + 0x69, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x41, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x44, 0x61, 0x74, 0x61, + 0x2e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x1a, 0xea, 0x01, 0x0a, 0x02, 0x56, 0x31, + 0x12, 0x75, 0x0a, 0x12, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x31, 0x2e, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x1a, 0x44, 0x0a, 0x16, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 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, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x22, 0xa1, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x31, 0x48, 0x00, + 0x52, 0x02, 0x76, 0x31, 0x1a, 0x44, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xdd, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3c, + 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, 0x76, 0x31, 0x1a, 0x7c, 0x0a, 0x02, + 0x56, 0x31, 0x12, 0x5b, 0x0a, 0x16, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x6d, 0x6c, 0x73, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x13, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xe8, 0x02, 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, 0x61, 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 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, 0x26, + 0x0a, 0x0f, 0x68, 0x70, 0x6b, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x68, 0x70, 0x6b, 0x65, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x1a, 0x8f, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x57, + 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 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, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, + 0x2a, 0xe7, 0x01, 0x0a, 0x13, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x41, 0x44, 0x4d, 0x49, + 0x4e, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x24, 0x0a, 0x20, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x55, + 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x41, + 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, + 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x02, 0x12, + 0x2a, 0x0a, 0x26, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x55, 0x50, + 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x53, 0x55, + 0x50, 0x45, 0x52, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x03, 0x12, 0x2d, 0x0a, 0x29, 0x41, + 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x5f, 0x53, 0x55, 0x50, + 0x45, 0x52, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x04, 0x42, 0xb9, 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, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_mls_database_intents_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_mls_database_intents_proto_goTypes = []any{ + (AdminListUpdateType)(0), // 0: xmtp.mls.database.AdminListUpdateType + (*SendMessageData)(nil), // 1: xmtp.mls.database.SendMessageData + (*AccountAddresses)(nil), // 2: xmtp.mls.database.AccountAddresses + (*InstallationIds)(nil), // 3: xmtp.mls.database.InstallationIds + (*AddressesOrInstallationIds)(nil), // 4: xmtp.mls.database.AddressesOrInstallationIds + (*AddMembersData)(nil), // 5: xmtp.mls.database.AddMembersData + (*RemoveMembersData)(nil), // 6: xmtp.mls.database.RemoveMembersData + (*UpdateGroupMembershipData)(nil), // 7: xmtp.mls.database.UpdateGroupMembershipData + (*UpdateMetadataData)(nil), // 8: xmtp.mls.database.UpdateMetadataData + (*UpdateAdminListsData)(nil), // 9: xmtp.mls.database.UpdateAdminListsData + (*PostCommitAction)(nil), // 10: xmtp.mls.database.PostCommitAction + (*SendMessageData_V1)(nil), // 11: xmtp.mls.database.SendMessageData.V1 + (*AddMembersData_V1)(nil), // 12: xmtp.mls.database.AddMembersData.V1 + (*RemoveMembersData_V1)(nil), // 13: xmtp.mls.database.RemoveMembersData.V1 + (*UpdateGroupMembershipData_V1)(nil), // 14: xmtp.mls.database.UpdateGroupMembershipData.V1 + nil, // 15: xmtp.mls.database.UpdateGroupMembershipData.V1.MembershipUpdatesEntry + (*UpdateMetadataData_V1)(nil), // 16: xmtp.mls.database.UpdateMetadataData.V1 + (*UpdateAdminListsData_V1)(nil), // 17: xmtp.mls.database.UpdateAdminListsData.V1 + (*PostCommitAction_Installation)(nil), // 18: xmtp.mls.database.PostCommitAction.Installation + (*PostCommitAction_SendWelcomes)(nil), // 19: xmtp.mls.database.PostCommitAction.SendWelcomes +} +var file_mls_database_intents_proto_depIdxs = []int32{ + 11, // 0: xmtp.mls.database.SendMessageData.v1:type_name -> xmtp.mls.database.SendMessageData.V1 + 2, // 1: xmtp.mls.database.AddressesOrInstallationIds.account_addresses:type_name -> xmtp.mls.database.AccountAddresses + 3, // 2: xmtp.mls.database.AddressesOrInstallationIds.installation_ids:type_name -> xmtp.mls.database.InstallationIds + 12, // 3: xmtp.mls.database.AddMembersData.v1:type_name -> xmtp.mls.database.AddMembersData.V1 + 13, // 4: xmtp.mls.database.RemoveMembersData.v1:type_name -> xmtp.mls.database.RemoveMembersData.V1 + 14, // 5: xmtp.mls.database.UpdateGroupMembershipData.v1:type_name -> xmtp.mls.database.UpdateGroupMembershipData.V1 + 16, // 6: xmtp.mls.database.UpdateMetadataData.v1:type_name -> xmtp.mls.database.UpdateMetadataData.V1 + 17, // 7: xmtp.mls.database.UpdateAdminListsData.v1:type_name -> xmtp.mls.database.UpdateAdminListsData.V1 + 19, // 8: xmtp.mls.database.PostCommitAction.send_welcomes:type_name -> xmtp.mls.database.PostCommitAction.SendWelcomes + 4, // 9: xmtp.mls.database.AddMembersData.V1.addresses_or_installation_ids:type_name -> xmtp.mls.database.AddressesOrInstallationIds + 4, // 10: xmtp.mls.database.RemoveMembersData.V1.addresses_or_installation_ids:type_name -> xmtp.mls.database.AddressesOrInstallationIds + 15, // 11: xmtp.mls.database.UpdateGroupMembershipData.V1.membership_updates:type_name -> xmtp.mls.database.UpdateGroupMembershipData.V1.MembershipUpdatesEntry + 0, // 12: xmtp.mls.database.UpdateAdminListsData.V1.admin_list_update_type:type_name -> xmtp.mls.database.AdminListUpdateType + 18, // 13: xmtp.mls.database.PostCommitAction.SendWelcomes.installations:type_name -> xmtp.mls.database.PostCommitAction.Installation + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + 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 any, i int) any { + switch v := v.(*UpdateGroupMembershipData); 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 any, i int) any { + switch v := v.(*UpdateMetadataData); 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 any, i int) any { + switch v := v.(*UpdateAdminListsData); 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 any, i int) any { + 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[10].Exporter = func(v any, i int) any { + 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[11].Exporter = func(v any, i int) any { + 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[12].Exporter = func(v any, i int) any { + 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[13].Exporter = func(v any, i int) any { + switch v := v.(*UpdateGroupMembershipData_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[15].Exporter = func(v any, i int) any { + switch v := v.(*UpdateMetadataData_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[16].Exporter = func(v any, i int) any { + switch v := v.(*UpdateAdminListsData_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[17].Exporter = func(v any, i int) any { + switch v := v.(*PostCommitAction_Installation); 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[18].Exporter = func(v any, i int) any { + 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 = []any{ + (*SendMessageData_V1_)(nil), + } + file_mls_database_intents_proto_msgTypes[3].OneofWrappers = []any{ + (*AddressesOrInstallationIds_AccountAddresses)(nil), + (*AddressesOrInstallationIds_InstallationIds)(nil), + } + file_mls_database_intents_proto_msgTypes[4].OneofWrappers = []any{ + (*AddMembersData_V1_)(nil), + } + file_mls_database_intents_proto_msgTypes[5].OneofWrappers = []any{ + (*RemoveMembersData_V1_)(nil), + } + file_mls_database_intents_proto_msgTypes[6].OneofWrappers = []any{ + (*UpdateGroupMembershipData_V1_)(nil), + } + file_mls_database_intents_proto_msgTypes[7].OneofWrappers = []any{ + (*UpdateMetadataData_V1_)(nil), + } + file_mls_database_intents_proto_msgTypes[8].OneofWrappers = []any{ + (*UpdateAdminListsData_V1_)(nil), + } + file_mls_database_intents_proto_msgTypes[9].OneofWrappers = []any{ + (*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: 1, + NumMessages: 19, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mls_database_intents_proto_goTypes, + DependencyIndexes: file_mls_database_intents_proto_depIdxs, + EnumInfos: file_mls_database_intents_proto_enumTypes, + 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..b5235792 --- /dev/null +++ b/pkg/proto/mls/message_contents/association.pb.go @@ -0,0 +1,590 @@ +// Associations and signatures + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: mls/message_contents/association.proto + +package message_contents + +import ( + message_contents "github.com/xmtp/xmtpd/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) +) + +// 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} +} + +// Used for "Grant Messaging Access" associations +type GrantMessagingAccessAssociation 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"` // EIP-191 signature + AccountAddress string `protobuf:"bytes,3,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + CreatedNs uint64 `protobuf:"varint,4,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` +} + +func (x *GrantMessagingAccessAssociation) Reset() { + *x = GrantMessagingAccessAssociation{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_association_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrantMessagingAccessAssociation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrantMessagingAccessAssociation) ProtoMessage() {} + +func (x *GrantMessagingAccessAssociation) 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 GrantMessagingAccessAssociation.ProtoReflect.Descriptor instead. +func (*GrantMessagingAccessAssociation) Descriptor() ([]byte, []int) { + return file_mls_message_contents_association_proto_rawDescGZIP(), []int{0} +} + +func (x *GrantMessagingAccessAssociation) GetAssociationTextVersion() AssociationTextVersion { + if x != nil { + return x.AssociationTextVersion + } + return AssociationTextVersion_ASSOCIATION_TEXT_VERSION_UNSPECIFIED +} + +func (x *GrantMessagingAccessAssociation) GetSignature() *RecoverableEcdsaSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *GrantMessagingAccessAssociation) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +func (x *GrantMessagingAccessAssociation) GetCreatedNs() uint64 { + if x != nil { + return x.CreatedNs + } + return 0 +} + +// Used for "Revoke Messaging Access" associations +type RevokeMessagingAccessAssociation 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"` // EIP-191 signature + AccountAddress string `protobuf:"bytes,3,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + CreatedNs uint64 `protobuf:"varint,4,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"` +} + +func (x *RevokeMessagingAccessAssociation) Reset() { + *x = RevokeMessagingAccessAssociation{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_association_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RevokeMessagingAccessAssociation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeMessagingAccessAssociation) ProtoMessage() {} + +func (x *RevokeMessagingAccessAssociation) 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 RevokeMessagingAccessAssociation.ProtoReflect.Descriptor instead. +func (*RevokeMessagingAccessAssociation) Descriptor() ([]byte, []int) { + return file_mls_message_contents_association_proto_rawDescGZIP(), []int{1} +} + +func (x *RevokeMessagingAccessAssociation) GetAssociationTextVersion() AssociationTextVersion { + if x != nil { + return x.AssociationTextVersion + } + return AssociationTextVersion_ASSOCIATION_TEXT_VERSION_UNSPECIFIED +} + +func (x *RevokeMessagingAccessAssociation) GetSignature() *RecoverableEcdsaSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *RevokeMessagingAccessAssociation) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +func (x *RevokeMessagingAccessAssociation) GetCreatedNs() uint64 { + if x != nil { + return x.CreatedNs + } + return 0 +} + +// LegacyCreateIdentityAssociation is used when a v3 installation key +// is signed by a v2 identity key, which in turn is signed via a +// 'CreateIdentity' wallet signature +type LegacyCreateIdentityAssociation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Signs SHA-256 hash of installation key + Signature *RecoverableEcdsaSignature `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // created_ns is encoded inside serialized key, account_address is recoverable + // from the SignedPublicKey signature + SignedLegacyCreateIdentityKey *message_contents.SignedPublicKey `protobuf:"bytes,2,opt,name=signed_legacy_create_identity_key,json=signedLegacyCreateIdentityKey,proto3" json:"signed_legacy_create_identity_key,omitempty"` +} + +func (x *LegacyCreateIdentityAssociation) Reset() { + *x = LegacyCreateIdentityAssociation{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_association_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LegacyCreateIdentityAssociation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LegacyCreateIdentityAssociation) ProtoMessage() {} + +func (x *LegacyCreateIdentityAssociation) 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 LegacyCreateIdentityAssociation.ProtoReflect.Descriptor instead. +func (*LegacyCreateIdentityAssociation) Descriptor() ([]byte, []int) { + return file_mls_message_contents_association_proto_rawDescGZIP(), []int{2} +} + +func (x *LegacyCreateIdentityAssociation) GetSignature() *RecoverableEcdsaSignature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *LegacyCreateIdentityAssociation) GetSignedLegacyCreateIdentityKey() *message_contents.SignedPublicKey { + if x != nil { + return x.SignedLegacyCreateIdentityKey + } + return nil +} + +// RecoverableEcdsaSignature +type RecoverableEcdsaSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 65-bytes [ R || S || V ], with 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[3] + 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[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 RecoverableEcdsaSignature.ProtoReflect.Descriptor instead. +func (*RecoverableEcdsaSignature) Descriptor() ([]byte, []int) { + return file_mls_message_contents_association_proto_rawDescGZIP(), []int{3} +} + +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[4] + 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[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 EdDsaSignature.ProtoReflect.Descriptor instead. +func (*EdDsaSignature) Descriptor() ([]byte, []int) { + return file_mls_message_contents_association_proto_rawDescGZIP(), []int{4} +} + +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, 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, 0xaa, 0x02, 0x0a, 0x1f, 0x47, 0x72, 0x61, 0x6e, 0x74, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 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, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x4e, 0x73, 0x22, 0xab, 0x02, 0x0a, 0x20, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 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, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4e, + 0x73, 0x22, 0xe7, 0x01, 0x0a, 0x1f, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x01, 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, 0x70, 0x0a, 0x21, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 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, 0x1d, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 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, 0xe9, 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, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, + 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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, 5) +var file_mls_message_contents_association_proto_goTypes = []any{ + (AssociationTextVersion)(0), // 0: xmtp.mls.message_contents.AssociationTextVersion + (*GrantMessagingAccessAssociation)(nil), // 1: xmtp.mls.message_contents.GrantMessagingAccessAssociation + (*RevokeMessagingAccessAssociation)(nil), // 2: xmtp.mls.message_contents.RevokeMessagingAccessAssociation + (*LegacyCreateIdentityAssociation)(nil), // 3: xmtp.mls.message_contents.LegacyCreateIdentityAssociation + (*RecoverableEcdsaSignature)(nil), // 4: xmtp.mls.message_contents.RecoverableEcdsaSignature + (*EdDsaSignature)(nil), // 5: xmtp.mls.message_contents.EdDsaSignature + (*message_contents.SignedPublicKey)(nil), // 6: xmtp.message_contents.SignedPublicKey +} +var file_mls_message_contents_association_proto_depIdxs = []int32{ + 0, // 0: xmtp.mls.message_contents.GrantMessagingAccessAssociation.association_text_version:type_name -> xmtp.mls.message_contents.AssociationTextVersion + 4, // 1: xmtp.mls.message_contents.GrantMessagingAccessAssociation.signature:type_name -> xmtp.mls.message_contents.RecoverableEcdsaSignature + 0, // 2: xmtp.mls.message_contents.RevokeMessagingAccessAssociation.association_text_version:type_name -> xmtp.mls.message_contents.AssociationTextVersion + 4, // 3: xmtp.mls.message_contents.RevokeMessagingAccessAssociation.signature:type_name -> xmtp.mls.message_contents.RecoverableEcdsaSignature + 4, // 4: xmtp.mls.message_contents.LegacyCreateIdentityAssociation.signature:type_name -> xmtp.mls.message_contents.RecoverableEcdsaSignature + 6, // 5: xmtp.mls.message_contents.LegacyCreateIdentityAssociation.signed_legacy_create_identity_key:type_name -> xmtp.message_contents.SignedPublicKey + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] 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 any, i int) any { + switch v := v.(*GrantMessagingAccessAssociation); 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 any, i int) any { + switch v := v.(*RevokeMessagingAccessAssociation); 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 any, i int) any { + switch v := v.(*LegacyCreateIdentityAssociation); 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[3].Exporter = func(v any, i int) any { + 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[4].Exporter = func(v any, i int) any { + 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: 5, + 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..802e2837 --- /dev/null +++ b/pkg/proto/mls/message_contents/content.pb.go @@ -0,0 +1,998 @@ +// 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.34.2 +// 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 +} + +// A PlaintextEnvelope is the outermost payload that gets encrypted by MLS +type PlaintextEnvelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Selector which declares which version of the EncodedContent this + // PlaintextEnvelope is + // + // Types that are assignable to Content: + // + // *PlaintextEnvelope_V1_ + // *PlaintextEnvelope_V2_ + Content isPlaintextEnvelope_Content `protobuf_oneof:"content"` +} + +func (x *PlaintextEnvelope) Reset() { + *x = PlaintextEnvelope{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_content_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlaintextEnvelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlaintextEnvelope) ProtoMessage() {} + +func (x *PlaintextEnvelope) ProtoReflect() protoreflect.Message { + mi := &file_mls_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 PlaintextEnvelope.ProtoReflect.Descriptor instead. +func (*PlaintextEnvelope) Descriptor() ([]byte, []int) { + return file_mls_message_contents_content_proto_rawDescGZIP(), []int{2} +} + +func (m *PlaintextEnvelope) GetContent() isPlaintextEnvelope_Content { + if m != nil { + return m.Content + } + return nil +} + +func (x *PlaintextEnvelope) GetV1() *PlaintextEnvelope_V1 { + if x, ok := x.GetContent().(*PlaintextEnvelope_V1_); ok { + return x.V1 + } + return nil +} + +func (x *PlaintextEnvelope) GetV2() *PlaintextEnvelope_V2 { + if x, ok := x.GetContent().(*PlaintextEnvelope_V2_); ok { + return x.V2 + } + return nil +} + +type isPlaintextEnvelope_Content interface { + isPlaintextEnvelope_Content() +} + +type PlaintextEnvelope_V1_ struct { + V1 *PlaintextEnvelope_V1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"` +} + +type PlaintextEnvelope_V2_ struct { + V2 *PlaintextEnvelope_V2 `protobuf:"bytes,2,opt,name=v2,proto3,oneof"` +} + +func (*PlaintextEnvelope_V1_) isPlaintextEnvelope_Content() {} + +func (*PlaintextEnvelope_V2_) isPlaintextEnvelope_Content() {} + +// Initiator or new installation id requesting a history will send a request +type MessageHistoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Unique identifier for each request + RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Ensures a human is in the loop + PinCode string `protobuf:"bytes,2,opt,name=pin_code,json=pinCode,proto3" json:"pin_code,omitempty"` +} + +func (x *MessageHistoryRequest) Reset() { + *x = MessageHistoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_content_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessageHistoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageHistoryRequest) ProtoMessage() {} + +func (x *MessageHistoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_content_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 MessageHistoryRequest.ProtoReflect.Descriptor instead. +func (*MessageHistoryRequest) Descriptor() ([]byte, []int) { + return file_mls_message_contents_content_proto_rawDescGZIP(), []int{3} +} + +func (x *MessageHistoryRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *MessageHistoryRequest) GetPinCode() string { + if x != nil { + return x.PinCode + } + return "" +} + +// Pre-existing installation id capable of supplying a history sends this reply +type MessageHistoryReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Must match an existing request_id from a message history request + RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Where the messages can be retrieved from + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + // Generated input 'secret' for the AES Key used to encrypt the message-bundle + EncryptionKey *MessageHistoryKeyType `protobuf:"bytes,3,opt,name=encryption_key,json=encryptionKey,proto3" json:"encryption_key,omitempty"` + // Generated input 'secret' for the HMAC Key used to sign the bundle_hash + SigningKey *MessageHistoryKeyType `protobuf:"bytes,4,opt,name=signing_key,json=signingKey,proto3" json:"signing_key,omitempty"` + // HMAC Signature of the message-bundle + BundleHash []byte `protobuf:"bytes,5,opt,name=bundle_hash,json=bundleHash,proto3" json:"bundle_hash,omitempty"` +} + +func (x *MessageHistoryReply) Reset() { + *x = MessageHistoryReply{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_content_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessageHistoryReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageHistoryReply) ProtoMessage() {} + +func (x *MessageHistoryReply) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_content_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 MessageHistoryReply.ProtoReflect.Descriptor instead. +func (*MessageHistoryReply) Descriptor() ([]byte, []int) { + return file_mls_message_contents_content_proto_rawDescGZIP(), []int{4} +} + +func (x *MessageHistoryReply) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *MessageHistoryReply) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *MessageHistoryReply) GetEncryptionKey() *MessageHistoryKeyType { + if x != nil { + return x.EncryptionKey + } + return nil +} + +func (x *MessageHistoryReply) GetSigningKey() *MessageHistoryKeyType { + if x != nil { + return x.SigningKey + } + return nil +} + +func (x *MessageHistoryReply) GetBundleHash() []byte { + if x != nil { + return x.BundleHash + } + return nil +} + +// Key used to encrypt or sign the message-bundle +type MessageHistoryKeyType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Key: + // + // *MessageHistoryKeyType_Chacha20Poly1305 + Key isMessageHistoryKeyType_Key `protobuf_oneof:"key"` +} + +func (x *MessageHistoryKeyType) Reset() { + *x = MessageHistoryKeyType{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_content_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessageHistoryKeyType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageHistoryKeyType) ProtoMessage() {} + +func (x *MessageHistoryKeyType) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_content_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 MessageHistoryKeyType.ProtoReflect.Descriptor instead. +func (*MessageHistoryKeyType) Descriptor() ([]byte, []int) { + return file_mls_message_contents_content_proto_rawDescGZIP(), []int{5} +} + +func (m *MessageHistoryKeyType) GetKey() isMessageHistoryKeyType_Key { + if m != nil { + return m.Key + } + return nil +} + +func (x *MessageHistoryKeyType) GetChacha20Poly1305() []byte { + if x, ok := x.GetKey().(*MessageHistoryKeyType_Chacha20Poly1305); ok { + return x.Chacha20Poly1305 + } + return nil +} + +type isMessageHistoryKeyType_Key interface { + isMessageHistoryKeyType_Key() +} + +type MessageHistoryKeyType_Chacha20Poly1305 struct { + Chacha20Poly1305 []byte `protobuf:"bytes,1,opt,name=chacha20_poly1305,json=chacha20Poly1305,proto3,oneof"` +} + +func (*MessageHistoryKeyType_Chacha20Poly1305) isMessageHistoryKeyType_Key() {} + +// Version 1 of the encrypted envelope +type PlaintextEnvelope_V1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Expected to be EncodedContent + Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + // A unique value that can be used to ensure that the same content can + // produce different hashes. May be the sender timestamp. + IdempotencyKey string `protobuf:"bytes,2,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` +} + +func (x *PlaintextEnvelope_V1) Reset() { + *x = PlaintextEnvelope_V1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_content_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlaintextEnvelope_V1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlaintextEnvelope_V1) ProtoMessage() {} + +func (x *PlaintextEnvelope_V1) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_content_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 PlaintextEnvelope_V1.ProtoReflect.Descriptor instead. +func (*PlaintextEnvelope_V1) Descriptor() ([]byte, []int) { + return file_mls_message_contents_content_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *PlaintextEnvelope_V1) GetContent() []byte { + if x != nil { + return x.Content + } + return nil +} + +func (x *PlaintextEnvelope_V1) GetIdempotencyKey() string { + if x != nil { + return x.IdempotencyKey + } + return "" +} + +// Version 2 of the encrypted envelope +type PlaintextEnvelope_V2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A unique value that can be used to ensure that the same content can + // produce different hashes. May be the sender timestamp. + IdempotencyKey string `protobuf:"bytes,1,opt,name=idempotency_key,json=idempotencyKey,proto3" json:"idempotency_key,omitempty"` + // Types that are assignable to MessageType: + // + // *PlaintextEnvelope_V2_Content + // *PlaintextEnvelope_V2_Request + // *PlaintextEnvelope_V2_Reply + MessageType isPlaintextEnvelope_V2_MessageType `protobuf_oneof:"message_type"` +} + +func (x *PlaintextEnvelope_V2) Reset() { + *x = PlaintextEnvelope_V2{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_content_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlaintextEnvelope_V2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlaintextEnvelope_V2) ProtoMessage() {} + +func (x *PlaintextEnvelope_V2) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_content_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 PlaintextEnvelope_V2.ProtoReflect.Descriptor instead. +func (*PlaintextEnvelope_V2) Descriptor() ([]byte, []int) { + return file_mls_message_contents_content_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *PlaintextEnvelope_V2) GetIdempotencyKey() string { + if x != nil { + return x.IdempotencyKey + } + return "" +} + +func (m *PlaintextEnvelope_V2) GetMessageType() isPlaintextEnvelope_V2_MessageType { + if m != nil { + return m.MessageType + } + return nil +} + +func (x *PlaintextEnvelope_V2) GetContent() []byte { + if x, ok := x.GetMessageType().(*PlaintextEnvelope_V2_Content); ok { + return x.Content + } + return nil +} + +func (x *PlaintextEnvelope_V2) GetRequest() *MessageHistoryRequest { + if x, ok := x.GetMessageType().(*PlaintextEnvelope_V2_Request); ok { + return x.Request + } + return nil +} + +func (x *PlaintextEnvelope_V2) GetReply() *MessageHistoryReply { + if x, ok := x.GetMessageType().(*PlaintextEnvelope_V2_Reply); ok { + return x.Reply + } + return nil +} + +type isPlaintextEnvelope_V2_MessageType interface { + isPlaintextEnvelope_V2_MessageType() +} + +type PlaintextEnvelope_V2_Content struct { + // Expected to be EncodedContent + Content []byte `protobuf:"bytes,2,opt,name=content,proto3,oneof"` +} + +type PlaintextEnvelope_V2_Request struct { + // Initiator sends a request to receive message history + Request *MessageHistoryRequest `protobuf:"bytes,3,opt,name=request,proto3,oneof"` +} + +type PlaintextEnvelope_V2_Reply struct { + // Some other authorized installation sends a reply + Reply *MessageHistoryReply `protobuf:"bytes,4,opt,name=reply,proto3,oneof"` +} + +func (*PlaintextEnvelope_V2_Content) isPlaintextEnvelope_V2_MessageType() {} + +func (*PlaintextEnvelope_V2_Request) isPlaintextEnvelope_V2_MessageType() {} + +func (*PlaintextEnvelope_V2_Reply) isPlaintextEnvelope_V2_MessageType() {} + +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, 0x22, 0xdf, 0x03, 0x0a, 0x11, 0x50, 0x6c, + 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, + 0x41, 0x0a, 0x02, 0x76, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 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, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x2e, 0x56, 0x31, 0x48, 0x00, 0x52, 0x02, + 0x76, 0x31, 0x12, 0x41, 0x0a, 0x02, 0x76, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, + 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, 0x6c, 0x61, 0x69, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x2e, 0x56, 0x32, 0x48, + 0x00, 0x52, 0x02, 0x76, 0x32, 0x1a, 0x47, 0x0a, 0x02, 0x56, 0x31, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, + 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4b, 0x65, 0x79, 0x1a, 0xef, + 0x01, 0x0a, 0x02, 0x56, 0x32, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, + 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1a, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, + 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, + 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x05, 0x72, 0x65, 0x70, 0x6c, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 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, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x70, 0x6c, 0x79, + 0x42, 0x0e, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x51, 0x0a, 0x15, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x69, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x93, + 0x02, 0x0a, 0x13, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x57, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x30, 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, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, + 0x12, 0x51, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x48, 0x61, 0x73, 0x68, 0x22, 0x4d, 0x0a, 0x15, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, + 0x11, 0x63, 0x68, 0x61, 0x63, 0x68, 0x61, 0x32, 0x30, 0x5f, 0x70, 0x6f, 0x6c, 0x79, 0x31, 0x33, + 0x30, 0x35, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x10, 0x63, 0x68, 0x61, 0x63, + 0x68, 0x61, 0x32, 0x30, 0x50, 0x6f, 0x6c, 0x79, 0x31, 0x33, 0x30, 0x35, 0x42, 0x05, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 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, 0xe5, 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, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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, 9) +var file_mls_message_contents_content_proto_goTypes = []any{ + (Compression)(0), // 0: xmtp.mls.message_contents.Compression + (*ContentTypeId)(nil), // 1: xmtp.mls.message_contents.ContentTypeId + (*EncodedContent)(nil), // 2: xmtp.mls.message_contents.EncodedContent + (*PlaintextEnvelope)(nil), // 3: xmtp.mls.message_contents.PlaintextEnvelope + (*MessageHistoryRequest)(nil), // 4: xmtp.mls.message_contents.MessageHistoryRequest + (*MessageHistoryReply)(nil), // 5: xmtp.mls.message_contents.MessageHistoryReply + (*MessageHistoryKeyType)(nil), // 6: xmtp.mls.message_contents.MessageHistoryKeyType + nil, // 7: xmtp.mls.message_contents.EncodedContent.ParametersEntry + (*PlaintextEnvelope_V1)(nil), // 8: xmtp.mls.message_contents.PlaintextEnvelope.V1 + (*PlaintextEnvelope_V2)(nil), // 9: xmtp.mls.message_contents.PlaintextEnvelope.V2 +} +var file_mls_message_contents_content_proto_depIdxs = []int32{ + 1, // 0: xmtp.mls.message_contents.EncodedContent.type:type_name -> xmtp.mls.message_contents.ContentTypeId + 7, // 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 + 8, // 3: xmtp.mls.message_contents.PlaintextEnvelope.v1:type_name -> xmtp.mls.message_contents.PlaintextEnvelope.V1 + 9, // 4: xmtp.mls.message_contents.PlaintextEnvelope.v2:type_name -> xmtp.mls.message_contents.PlaintextEnvelope.V2 + 6, // 5: xmtp.mls.message_contents.MessageHistoryReply.encryption_key:type_name -> xmtp.mls.message_contents.MessageHistoryKeyType + 6, // 6: xmtp.mls.message_contents.MessageHistoryReply.signing_key:type_name -> xmtp.mls.message_contents.MessageHistoryKeyType + 4, // 7: xmtp.mls.message_contents.PlaintextEnvelope.V2.request:type_name -> xmtp.mls.message_contents.MessageHistoryRequest + 5, // 8: xmtp.mls.message_contents.PlaintextEnvelope.V2.reply:type_name -> xmtp.mls.message_contents.MessageHistoryReply + 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_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 any, i int) any { + 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 any, i int) any { + 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[2].Exporter = func(v any, i int) any { + switch v := v.(*PlaintextEnvelope); 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[3].Exporter = func(v any, i int) any { + switch v := v.(*MessageHistoryRequest); 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[4].Exporter = func(v any, i int) any { + switch v := v.(*MessageHistoryReply); 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[5].Exporter = func(v any, i int) any { + switch v := v.(*MessageHistoryKeyType); 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[7].Exporter = func(v any, i int) any { + switch v := v.(*PlaintextEnvelope_V1); 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[8].Exporter = func(v any, i int) any { + switch v := v.(*PlaintextEnvelope_V2); 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 = []any{} + file_mls_message_contents_content_proto_msgTypes[2].OneofWrappers = []any{ + (*PlaintextEnvelope_V1_)(nil), + (*PlaintextEnvelope_V2_)(nil), + } + file_mls_message_contents_content_proto_msgTypes[5].OneofWrappers = []any{ + (*MessageHistoryKeyType_Chacha20Poly1305)(nil), + } + file_mls_message_contents_content_proto_msgTypes[8].OneofWrappers = []any{ + (*PlaintextEnvelope_V2_Content)(nil), + (*PlaintextEnvelope_V2_Request)(nil), + (*PlaintextEnvelope_V2_Reply)(nil), + } + 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: 9, + 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..f88c1e54 --- /dev/null +++ b/pkg/proto/mls/message_contents/credential.pb.go @@ -0,0 +1,381 @@ +// Credentials and revocations + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// 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_MessagingAccess + // *MlsCredential_LegacyCreateIdentity + 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) GetMessagingAccess() *GrantMessagingAccessAssociation { + if x, ok := x.GetAssociation().(*MlsCredential_MessagingAccess); ok { + return x.MessagingAccess + } + return nil +} + +func (x *MlsCredential) GetLegacyCreateIdentity() *LegacyCreateIdentityAssociation { + if x, ok := x.GetAssociation().(*MlsCredential_LegacyCreateIdentity); ok { + return x.LegacyCreateIdentity + } + return nil +} + +type isMlsCredential_Association interface { + isMlsCredential_Association() +} + +type MlsCredential_MessagingAccess struct { + MessagingAccess *GrantMessagingAccessAssociation `protobuf:"bytes,2,opt,name=messaging_access,json=messagingAccess,proto3,oneof"` +} + +type MlsCredential_LegacyCreateIdentity struct { + LegacyCreateIdentity *LegacyCreateIdentityAssociation `protobuf:"bytes,3,opt,name=legacy_create_identity,json=legacyCreateIdentity,proto3,oneof"` +} + +func (*MlsCredential_MessagingAccess) isMlsCredential_Association() {} + +func (*MlsCredential_LegacyCreateIdentity) 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 + + // Types that are assignable to PublicKey: + // + // *CredentialRevocation_InstallationKey + // *CredentialRevocation_UnsignedLegacyCreateIdentityKey + PublicKey isCredentialRevocation_PublicKey `protobuf_oneof:"public_key"` + // Types that are assignable to Association: + // + // *CredentialRevocation_MessagingAccess + 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 (m *CredentialRevocation) GetPublicKey() isCredentialRevocation_PublicKey { + if m != nil { + return m.PublicKey + } + return nil +} + +func (x *CredentialRevocation) GetInstallationKey() []byte { + if x, ok := x.GetPublicKey().(*CredentialRevocation_InstallationKey); ok { + return x.InstallationKey + } + return nil +} + +func (x *CredentialRevocation) GetUnsignedLegacyCreateIdentityKey() []byte { + if x, ok := x.GetPublicKey().(*CredentialRevocation_UnsignedLegacyCreateIdentityKey); ok { + return x.UnsignedLegacyCreateIdentityKey + } + return nil +} + +func (m *CredentialRevocation) GetAssociation() isCredentialRevocation_Association { + if m != nil { + return m.Association + } + return nil +} + +func (x *CredentialRevocation) GetMessagingAccess() *RevokeMessagingAccessAssociation { + if x, ok := x.GetAssociation().(*CredentialRevocation_MessagingAccess); ok { + return x.MessagingAccess + } + return nil +} + +type isCredentialRevocation_PublicKey interface { + isCredentialRevocation_PublicKey() +} + +type CredentialRevocation_InstallationKey struct { + // The 'installation_public_key' field of the MlsCredential proto + InstallationKey []byte `protobuf:"bytes,1,opt,name=installation_key,json=installationKey,proto3,oneof"` +} + +type CredentialRevocation_UnsignedLegacyCreateIdentityKey struct { + // The 'key_bytes' field of the legacy SignedPublicKey proto + UnsignedLegacyCreateIdentityKey []byte `protobuf:"bytes,2,opt,name=unsigned_legacy_create_identity_key,json=unsignedLegacyCreateIdentityKey,proto3,oneof"` +} + +func (*CredentialRevocation_InstallationKey) isCredentialRevocation_PublicKey() {} + +func (*CredentialRevocation_UnsignedLegacyCreateIdentityKey) isCredentialRevocation_PublicKey() {} + +type isCredentialRevocation_Association interface { + isCredentialRevocation_Association() +} + +type CredentialRevocation_MessagingAccess struct { + MessagingAccess *RevokeMessagingAccessAssociation `protobuf:"bytes,3,opt,name=messaging_access,json=messagingAccess,proto3,oneof"` +} + +func (*CredentialRevocation_MessagingAccess) 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, 0xb3, 0x02, 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, 0x67, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, + 0x67, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, + 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, 0x47, 0x72, 0x61, 0x6e, 0x74, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x41, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x72, 0x0a, + 0x16, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 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, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, 0x6c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x42, 0x0d, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x9a, 0x02, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, + 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x10, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x4e, 0x0a, 0x23, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x1f, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x4c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x68, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3b, 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, 0x76, + 0x6f, 0x6b, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, + 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x42, 0x0c, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x42, 0x0d, + 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xe8, 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, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, + 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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 = []any{ + (*MlsCredential)(nil), // 0: xmtp.mls.message_contents.MlsCredential + (*CredentialRevocation)(nil), // 1: xmtp.mls.message_contents.CredentialRevocation + (*GrantMessagingAccessAssociation)(nil), // 2: xmtp.mls.message_contents.GrantMessagingAccessAssociation + (*LegacyCreateIdentityAssociation)(nil), // 3: xmtp.mls.message_contents.LegacyCreateIdentityAssociation + (*RevokeMessagingAccessAssociation)(nil), // 4: xmtp.mls.message_contents.RevokeMessagingAccessAssociation +} +var file_mls_message_contents_credential_proto_depIdxs = []int32{ + 2, // 0: xmtp.mls.message_contents.MlsCredential.messaging_access:type_name -> xmtp.mls.message_contents.GrantMessagingAccessAssociation + 3, // 1: xmtp.mls.message_contents.MlsCredential.legacy_create_identity:type_name -> xmtp.mls.message_contents.LegacyCreateIdentityAssociation + 4, // 2: xmtp.mls.message_contents.CredentialRevocation.messaging_access:type_name -> xmtp.mls.message_contents.RevokeMessagingAccessAssociation + 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_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 any, i int) any { + 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 any, i int) any { + 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 = []any{ + (*MlsCredential_MessagingAccess)(nil), + (*MlsCredential_LegacyCreateIdentity)(nil), + } + file_mls_message_contents_credential_proto_msgTypes[1].OneofWrappers = []any{ + (*CredentialRevocation_InstallationKey)(nil), + (*CredentialRevocation_UnsignedLegacyCreateIdentityKey)(nil), + (*CredentialRevocation_MessagingAccess)(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_membership.pb.go b/pkg/proto/mls/message_contents/group_membership.pb.go new file mode 100644 index 00000000..4ffd3342 --- /dev/null +++ b/pkg/proto/mls/message_contents/group_membership.pb.go @@ -0,0 +1,173 @@ +// Group membership + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: mls/message_contents/group_membership.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) +) + +// Contains a mapping of `inbox_id` -> `sequence_id` for all members of a group. +// Designed to be stored in the group context extension of the MLS group +type GroupMembership struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Members map[string]uint64 `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (x *GroupMembership) Reset() { + *x = GroupMembership{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_membership_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupMembership) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupMembership) ProtoMessage() {} + +func (x *GroupMembership) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_membership_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 GroupMembership.ProtoReflect.Descriptor instead. +func (*GroupMembership) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_membership_proto_rawDescGZIP(), []int{0} +} + +func (x *GroupMembership) GetMembers() map[string]uint64 { + if x != nil { + return x.Members + } + return nil +} + +var File_mls_message_contents_group_membership_proto protoreflect.FileDescriptor + +var file_mls_message_contents_group_membership_proto_rawDesc = []byte{ + 0x0a, 0x2b, 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, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 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, 0x01, 0x0a, 0x0f, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x51, 0x0a, 0x07, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 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, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x1a, + 0x3a, 0x0a, 0x0c, 0x4d, 0x65, 0x6d, 0x62, 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, 0x04, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xed, 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, 0x14, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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_membership_proto_rawDescOnce sync.Once + file_mls_message_contents_group_membership_proto_rawDescData = file_mls_message_contents_group_membership_proto_rawDesc +) + +func file_mls_message_contents_group_membership_proto_rawDescGZIP() []byte { + file_mls_message_contents_group_membership_proto_rawDescOnce.Do(func() { + file_mls_message_contents_group_membership_proto_rawDescData = protoimpl.X.CompressGZIP(file_mls_message_contents_group_membership_proto_rawDescData) + }) + return file_mls_message_contents_group_membership_proto_rawDescData +} + +var file_mls_message_contents_group_membership_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_mls_message_contents_group_membership_proto_goTypes = []any{ + (*GroupMembership)(nil), // 0: xmtp.mls.message_contents.GroupMembership + nil, // 1: xmtp.mls.message_contents.GroupMembership.MembersEntry +} +var file_mls_message_contents_group_membership_proto_depIdxs = []int32{ + 1, // 0: xmtp.mls.message_contents.GroupMembership.members:type_name -> xmtp.mls.message_contents.GroupMembership.MembersEntry + 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_mls_message_contents_group_membership_proto_init() } +func file_mls_message_contents_group_membership_proto_init() { + if File_mls_message_contents_group_membership_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mls_message_contents_group_membership_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GroupMembership); 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_group_membership_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mls_message_contents_group_membership_proto_goTypes, + DependencyIndexes: file_mls_message_contents_group_membership_proto_depIdxs, + MessageInfos: file_mls_message_contents_group_membership_proto_msgTypes, + }.Build() + File_mls_message_contents_group_membership_proto = out.File + file_mls_message_contents_group_membership_proto_rawDesc = nil + file_mls_message_contents_group_membership_proto_goTypes = nil + file_mls_message_contents_group_membership_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..6669aa8d --- /dev/null +++ b/pkg/proto/mls/message_contents/group_metadata.pb.go @@ -0,0 +1,255 @@ +// Group immutable metadata + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// 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 + ConversationType_CONVERSATION_TYPE_SYNC ConversationType = 3 +) + +// Enum value maps for ConversationType. +var ( + ConversationType_name = map[int32]string{ + 0: "CONVERSATION_TYPE_UNSPECIFIED", + 1: "CONVERSATION_TYPE_GROUP", + 2: "CONVERSATION_TYPE_DM", + 3: "CONVERSATION_TYPE_SYNC", + } + ConversationType_value = map[string]int32{ + "CONVERSATION_TYPE_UNSPECIFIED": 0, + "CONVERSATION_TYPE_GROUP": 1, + "CONVERSATION_TYPE_DM": 2, + "CONVERSATION_TYPE_SYNC": 3, + } +) + +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} +} + +// 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"` + // This will be removed soon + CreatorAccountAddress string `protobuf:"bytes,2,opt,name=creator_account_address,json=creatorAccountAddress,proto3" json:"creator_account_address,omitempty"` + CreatorInboxId string `protobuf:"bytes,3,opt,name=creator_inbox_id,json=creatorInboxId,proto3" json:"creator_inbox_id,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) GetCreatorInboxId() string { + if x != nil { + return x.CreatorInboxId + } + return "" +} + +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, 0xcd, 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, 0x28, 0x0a, 0x10, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, + 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x2a, 0x88, 0x01, 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, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, + 0x03, 0x42, 0xeb, 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, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, + 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, 1) +var file_mls_message_contents_group_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_mls_message_contents_group_metadata_proto_goTypes = []any{ + (ConversationType)(0), // 0: xmtp.mls.message_contents.ConversationType + (*GroupMetadataV1)(nil), // 1: xmtp.mls.message_contents.GroupMetadataV1 +} +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 + 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_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 any, i int) any { + switch v := v.(*GroupMetadataV1); 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_group_metadata_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + 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/group_mutable_metadata.pb.go b/pkg/proto/mls/message_contents/group_mutable_metadata.pb.go new file mode 100644 index 00000000..8a38d0dd --- /dev/null +++ b/pkg/proto/mls/message_contents/group_mutable_metadata.pb.go @@ -0,0 +1,268 @@ +// Group mutable metadata + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: mls/message_contents/group_mutable_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) +) + +// Message for group mutable metadata +type GroupMutableMetadataV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Map to store various metadata attributes (Group name, etc.) + Attributes map[string]string `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + AdminList *Inboxes `protobuf:"bytes,2,opt,name=admin_list,json=adminList,proto3" json:"admin_list,omitempty"` + // Creator starts as only super_admin + // Only super_admin can add/remove other super_admin + SuperAdminList *Inboxes `protobuf:"bytes,3,opt,name=super_admin_list,json=superAdminList,proto3" json:"super_admin_list,omitempty"` +} + +func (x *GroupMutableMetadataV1) Reset() { + *x = GroupMutableMetadataV1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_mutable_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupMutableMetadataV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupMutableMetadataV1) ProtoMessage() {} + +func (x *GroupMutableMetadataV1) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_mutable_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 GroupMutableMetadataV1.ProtoReflect.Descriptor instead. +func (*GroupMutableMetadataV1) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_mutable_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *GroupMutableMetadataV1) GetAttributes() map[string]string { + if x != nil { + return x.Attributes + } + return nil +} + +func (x *GroupMutableMetadataV1) GetAdminList() *Inboxes { + if x != nil { + return x.AdminList + } + return nil +} + +func (x *GroupMutableMetadataV1) GetSuperAdminList() *Inboxes { + if x != nil { + return x.SuperAdminList + } + return nil +} + +// Wrapper around a list of repeated Inbox Ids +type Inboxes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InboxIds []string `protobuf:"bytes,1,rep,name=inbox_ids,json=inboxIds,proto3" json:"inbox_ids,omitempty"` +} + +func (x *Inboxes) Reset() { + *x = Inboxes{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_mutable_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Inboxes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Inboxes) ProtoMessage() {} + +func (x *Inboxes) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_mutable_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 Inboxes.ProtoReflect.Descriptor instead. +func (*Inboxes) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_mutable_metadata_proto_rawDescGZIP(), []int{1} +} + +func (x *Inboxes) GetInboxIds() []string { + if x != nil { + return x.InboxIds + } + return nil +} + +var File_mls_message_contents_group_mutable_metadata_proto protoreflect.FileDescriptor + +var file_mls_message_contents_group_mutable_metadata_proto_rawDesc = []byte{ + 0x0a, 0x31, 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, 0x75, 0x74, + 0x61, 0x62, 0x6c, 0x65, 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, 0xcb, + 0x02, 0x0a, 0x16, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x56, 0x31, 0x12, 0x61, 0x0a, 0x0a, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 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, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, + 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x56, 0x31, + 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0a, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 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, 0x49, 0x6e, 0x62, + 0x6f, 0x78, 0x65, 0x73, 0x52, 0x09, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x4c, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, + 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 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, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x52, 0x0e, 0x73, + 0x75, 0x70, 0x65, 0x72, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0x3d, 0x0a, + 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 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, 0x22, 0x26, 0x0a, 0x07, + 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x78, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x62, 0x6f, + 0x78, 0x49, 0x64, 0x73, 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, 0x19, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x75, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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_mutable_metadata_proto_rawDescOnce sync.Once + file_mls_message_contents_group_mutable_metadata_proto_rawDescData = file_mls_message_contents_group_mutable_metadata_proto_rawDesc +) + +func file_mls_message_contents_group_mutable_metadata_proto_rawDescGZIP() []byte { + file_mls_message_contents_group_mutable_metadata_proto_rawDescOnce.Do(func() { + file_mls_message_contents_group_mutable_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_mls_message_contents_group_mutable_metadata_proto_rawDescData) + }) + return file_mls_message_contents_group_mutable_metadata_proto_rawDescData +} + +var file_mls_message_contents_group_mutable_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_mls_message_contents_group_mutable_metadata_proto_goTypes = []any{ + (*GroupMutableMetadataV1)(nil), // 0: xmtp.mls.message_contents.GroupMutableMetadataV1 + (*Inboxes)(nil), // 1: xmtp.mls.message_contents.Inboxes + nil, // 2: xmtp.mls.message_contents.GroupMutableMetadataV1.AttributesEntry +} +var file_mls_message_contents_group_mutable_metadata_proto_depIdxs = []int32{ + 2, // 0: xmtp.mls.message_contents.GroupMutableMetadataV1.attributes:type_name -> xmtp.mls.message_contents.GroupMutableMetadataV1.AttributesEntry + 1, // 1: xmtp.mls.message_contents.GroupMutableMetadataV1.admin_list:type_name -> xmtp.mls.message_contents.Inboxes + 1, // 2: xmtp.mls.message_contents.GroupMutableMetadataV1.super_admin_list:type_name -> xmtp.mls.message_contents.Inboxes + 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_group_mutable_metadata_proto_init() } +func file_mls_message_contents_group_mutable_metadata_proto_init() { + if File_mls_message_contents_group_mutable_metadata_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mls_message_contents_group_mutable_metadata_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GroupMutableMetadataV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_group_mutable_metadata_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*Inboxes); 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_group_mutable_metadata_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mls_message_contents_group_mutable_metadata_proto_goTypes, + DependencyIndexes: file_mls_message_contents_group_mutable_metadata_proto_depIdxs, + MessageInfos: file_mls_message_contents_group_mutable_metadata_proto_msgTypes, + }.Build() + File_mls_message_contents_group_mutable_metadata_proto = out.File + file_mls_message_contents_group_mutable_metadata_proto_rawDesc = nil + file_mls_message_contents_group_mutable_metadata_proto_goTypes = nil + file_mls_message_contents_group_mutable_metadata_proto_depIdxs = nil +} diff --git a/pkg/proto/mls/message_contents/group_permissions.pb.go b/pkg/proto/mls/message_contents/group_permissions.pb.go new file mode 100644 index 00000000..22784723 --- /dev/null +++ b/pkg/proto/mls/message_contents/group_permissions.pb.go @@ -0,0 +1,1344 @@ +// Group mutable permissions metadata + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: mls/message_contents/group_permissions.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) +) + +// 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_ADMIN_OR_SUPER_ADMIN MembershipPolicy_BasePolicy = 3 + MembershipPolicy_BASE_POLICY_ALLOW_IF_SUPER_ADMIN MembershipPolicy_BasePolicy = 4 +) + +// 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_ADMIN_OR_SUPER_ADMIN", + 4: "BASE_POLICY_ALLOW_IF_SUPER_ADMIN", + } + MembershipPolicy_BasePolicy_value = map[string]int32{ + "BASE_POLICY_UNSPECIFIED": 0, + "BASE_POLICY_ALLOW": 1, + "BASE_POLICY_DENY": 2, + "BASE_POLICY_ALLOW_IF_ADMIN_OR_SUPER_ADMIN": 3, + "BASE_POLICY_ALLOW_IF_SUPER_ADMIN": 4, + } +) + +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_permissions_proto_enumTypes[0].Descriptor() +} + +func (MembershipPolicy_BasePolicy) Type() protoreflect.EnumType { + return &file_mls_message_contents_group_permissions_proto_enumTypes[0] +} + +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_permissions_proto_rawDescGZIP(), []int{2, 0} +} + +// Base policy +type MetadataPolicy_MetadataBasePolicy int32 + +const ( + MetadataPolicy_METADATA_BASE_POLICY_UNSPECIFIED MetadataPolicy_MetadataBasePolicy = 0 + MetadataPolicy_METADATA_BASE_POLICY_ALLOW MetadataPolicy_MetadataBasePolicy = 1 + MetadataPolicy_METADATA_BASE_POLICY_DENY MetadataPolicy_MetadataBasePolicy = 2 + MetadataPolicy_METADATA_BASE_POLICY_ALLOW_IF_ADMIN MetadataPolicy_MetadataBasePolicy = 3 + MetadataPolicy_METADATA_BASE_POLICY_ALLOW_IF_SUPER_ADMIN MetadataPolicy_MetadataBasePolicy = 4 +) + +// Enum value maps for MetadataPolicy_MetadataBasePolicy. +var ( + MetadataPolicy_MetadataBasePolicy_name = map[int32]string{ + 0: "METADATA_BASE_POLICY_UNSPECIFIED", + 1: "METADATA_BASE_POLICY_ALLOW", + 2: "METADATA_BASE_POLICY_DENY", + 3: "METADATA_BASE_POLICY_ALLOW_IF_ADMIN", + 4: "METADATA_BASE_POLICY_ALLOW_IF_SUPER_ADMIN", + } + MetadataPolicy_MetadataBasePolicy_value = map[string]int32{ + "METADATA_BASE_POLICY_UNSPECIFIED": 0, + "METADATA_BASE_POLICY_ALLOW": 1, + "METADATA_BASE_POLICY_DENY": 2, + "METADATA_BASE_POLICY_ALLOW_IF_ADMIN": 3, + "METADATA_BASE_POLICY_ALLOW_IF_SUPER_ADMIN": 4, + } +) + +func (x MetadataPolicy_MetadataBasePolicy) Enum() *MetadataPolicy_MetadataBasePolicy { + p := new(MetadataPolicy_MetadataBasePolicy) + *p = x + return p +} + +func (x MetadataPolicy_MetadataBasePolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MetadataPolicy_MetadataBasePolicy) Descriptor() protoreflect.EnumDescriptor { + return file_mls_message_contents_group_permissions_proto_enumTypes[1].Descriptor() +} + +func (MetadataPolicy_MetadataBasePolicy) Type() protoreflect.EnumType { + return &file_mls_message_contents_group_permissions_proto_enumTypes[1] +} + +func (x MetadataPolicy_MetadataBasePolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MetadataPolicy_MetadataBasePolicy.Descriptor instead. +func (MetadataPolicy_MetadataBasePolicy) EnumDescriptor() ([]byte, []int) { + return file_mls_message_contents_group_permissions_proto_rawDescGZIP(), []int{3, 0} +} + +// Base policy +type PermissionsUpdatePolicy_PermissionsBasePolicy int32 + +const ( + PermissionsUpdatePolicy_PERMISSIONS_BASE_POLICY_UNSPECIFIED PermissionsUpdatePolicy_PermissionsBasePolicy = 0 + PermissionsUpdatePolicy_PERMISSIONS_BASE_POLICY_DENY PermissionsUpdatePolicy_PermissionsBasePolicy = 1 + PermissionsUpdatePolicy_PERMISSIONS_BASE_POLICY_ALLOW_IF_ADMIN PermissionsUpdatePolicy_PermissionsBasePolicy = 2 + PermissionsUpdatePolicy_PERMISSIONS_BASE_POLICY_ALLOW_IF_SUPER_ADMIN PermissionsUpdatePolicy_PermissionsBasePolicy = 3 +) + +// Enum value maps for PermissionsUpdatePolicy_PermissionsBasePolicy. +var ( + PermissionsUpdatePolicy_PermissionsBasePolicy_name = map[int32]string{ + 0: "PERMISSIONS_BASE_POLICY_UNSPECIFIED", + 1: "PERMISSIONS_BASE_POLICY_DENY", + 2: "PERMISSIONS_BASE_POLICY_ALLOW_IF_ADMIN", + 3: "PERMISSIONS_BASE_POLICY_ALLOW_IF_SUPER_ADMIN", + } + PermissionsUpdatePolicy_PermissionsBasePolicy_value = map[string]int32{ + "PERMISSIONS_BASE_POLICY_UNSPECIFIED": 0, + "PERMISSIONS_BASE_POLICY_DENY": 1, + "PERMISSIONS_BASE_POLICY_ALLOW_IF_ADMIN": 2, + "PERMISSIONS_BASE_POLICY_ALLOW_IF_SUPER_ADMIN": 3, + } +) + +func (x PermissionsUpdatePolicy_PermissionsBasePolicy) Enum() *PermissionsUpdatePolicy_PermissionsBasePolicy { + p := new(PermissionsUpdatePolicy_PermissionsBasePolicy) + *p = x + return p +} + +func (x PermissionsUpdatePolicy_PermissionsBasePolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PermissionsUpdatePolicy_PermissionsBasePolicy) Descriptor() protoreflect.EnumDescriptor { + return file_mls_message_contents_group_permissions_proto_enumTypes[2].Descriptor() +} + +func (PermissionsUpdatePolicy_PermissionsBasePolicy) Type() protoreflect.EnumType { + return &file_mls_message_contents_group_permissions_proto_enumTypes[2] +} + +func (x PermissionsUpdatePolicy_PermissionsBasePolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PermissionsUpdatePolicy_PermissionsBasePolicy.Descriptor instead. +func (PermissionsUpdatePolicy_PermissionsBasePolicy) EnumDescriptor() ([]byte, []int) { + return file_mls_message_contents_group_permissions_proto_rawDescGZIP(), []int{4, 0} +} + +// Message for group mutable metadata +type GroupMutablePermissionsV1 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Policies *PolicySet `protobuf:"bytes,1,opt,name=policies,proto3" json:"policies,omitempty"` +} + +func (x *GroupMutablePermissionsV1) Reset() { + *x = GroupMutablePermissionsV1{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_permissions_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupMutablePermissionsV1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupMutablePermissionsV1) ProtoMessage() {} + +func (x *GroupMutablePermissionsV1) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_permissions_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 GroupMutablePermissionsV1.ProtoReflect.Descriptor instead. +func (*GroupMutablePermissionsV1) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_permissions_proto_rawDescGZIP(), []int{0} +} + +func (x *GroupMutablePermissionsV1) 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"` + UpdateMetadataPolicy map[string]*MetadataPolicy `protobuf:"bytes,3,rep,name=update_metadata_policy,json=updateMetadataPolicy,proto3" json:"update_metadata_policy,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + AddAdminPolicy *PermissionsUpdatePolicy `protobuf:"bytes,4,opt,name=add_admin_policy,json=addAdminPolicy,proto3" json:"add_admin_policy,omitempty"` + RemoveAdminPolicy *PermissionsUpdatePolicy `protobuf:"bytes,5,opt,name=remove_admin_policy,json=removeAdminPolicy,proto3" json:"remove_admin_policy,omitempty"` + UpdatePermissionsPolicy *PermissionsUpdatePolicy `protobuf:"bytes,6,opt,name=update_permissions_policy,json=updatePermissionsPolicy,proto3" json:"update_permissions_policy,omitempty"` +} + +func (x *PolicySet) Reset() { + *x = PolicySet{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_permissions_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_permissions_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_permissions_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 +} + +func (x *PolicySet) GetUpdateMetadataPolicy() map[string]*MetadataPolicy { + if x != nil { + return x.UpdateMetadataPolicy + } + return nil +} + +func (x *PolicySet) GetAddAdminPolicy() *PermissionsUpdatePolicy { + if x != nil { + return x.AddAdminPolicy + } + return nil +} + +func (x *PolicySet) GetRemoveAdminPolicy() *PermissionsUpdatePolicy { + if x != nil { + return x.RemoveAdminPolicy + } + return nil +} + +func (x *PolicySet) GetUpdatePermissionsPolicy() *PermissionsUpdatePolicy { + if x != nil { + return x.UpdatePermissionsPolicy + } + 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_permissions_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_permissions_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_permissions_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() {} + +// A policy that governs updating metadata +type MetadataPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Kind: + // + // *MetadataPolicy_Base + // *MetadataPolicy_AndCondition_ + // *MetadataPolicy_AnyCondition_ + Kind isMetadataPolicy_Kind `protobuf_oneof:"kind"` +} + +func (x *MetadataPolicy) Reset() { + *x = MetadataPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_permissions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetadataPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataPolicy) ProtoMessage() {} + +func (x *MetadataPolicy) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_permissions_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 MetadataPolicy.ProtoReflect.Descriptor instead. +func (*MetadataPolicy) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_permissions_proto_rawDescGZIP(), []int{3} +} + +func (m *MetadataPolicy) GetKind() isMetadataPolicy_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (x *MetadataPolicy) GetBase() MetadataPolicy_MetadataBasePolicy { + if x, ok := x.GetKind().(*MetadataPolicy_Base); ok { + return x.Base + } + return MetadataPolicy_METADATA_BASE_POLICY_UNSPECIFIED +} + +func (x *MetadataPolicy) GetAndCondition() *MetadataPolicy_AndCondition { + if x, ok := x.GetKind().(*MetadataPolicy_AndCondition_); ok { + return x.AndCondition + } + return nil +} + +func (x *MetadataPolicy) GetAnyCondition() *MetadataPolicy_AnyCondition { + if x, ok := x.GetKind().(*MetadataPolicy_AnyCondition_); ok { + return x.AnyCondition + } + return nil +} + +type isMetadataPolicy_Kind interface { + isMetadataPolicy_Kind() +} + +type MetadataPolicy_Base struct { + Base MetadataPolicy_MetadataBasePolicy `protobuf:"varint,1,opt,name=base,proto3,enum=xmtp.mls.message_contents.MetadataPolicy_MetadataBasePolicy,oneof"` +} + +type MetadataPolicy_AndCondition_ struct { + AndCondition *MetadataPolicy_AndCondition `protobuf:"bytes,2,opt,name=and_condition,json=andCondition,proto3,oneof"` +} + +type MetadataPolicy_AnyCondition_ struct { + AnyCondition *MetadataPolicy_AnyCondition `protobuf:"bytes,3,opt,name=any_condition,json=anyCondition,proto3,oneof"` +} + +func (*MetadataPolicy_Base) isMetadataPolicy_Kind() {} + +func (*MetadataPolicy_AndCondition_) isMetadataPolicy_Kind() {} + +func (*MetadataPolicy_AnyCondition_) isMetadataPolicy_Kind() {} + +// A policy that governs updating permissions +type PermissionsUpdatePolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Kind: + // + // *PermissionsUpdatePolicy_Base + // *PermissionsUpdatePolicy_AndCondition_ + // *PermissionsUpdatePolicy_AnyCondition_ + Kind isPermissionsUpdatePolicy_Kind `protobuf_oneof:"kind"` +} + +func (x *PermissionsUpdatePolicy) Reset() { + *x = PermissionsUpdatePolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_permissions_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PermissionsUpdatePolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PermissionsUpdatePolicy) ProtoMessage() {} + +func (x *PermissionsUpdatePolicy) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_permissions_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 PermissionsUpdatePolicy.ProtoReflect.Descriptor instead. +func (*PermissionsUpdatePolicy) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_permissions_proto_rawDescGZIP(), []int{4} +} + +func (m *PermissionsUpdatePolicy) GetKind() isPermissionsUpdatePolicy_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (x *PermissionsUpdatePolicy) GetBase() PermissionsUpdatePolicy_PermissionsBasePolicy { + if x, ok := x.GetKind().(*PermissionsUpdatePolicy_Base); ok { + return x.Base + } + return PermissionsUpdatePolicy_PERMISSIONS_BASE_POLICY_UNSPECIFIED +} + +func (x *PermissionsUpdatePolicy) GetAndCondition() *PermissionsUpdatePolicy_AndCondition { + if x, ok := x.GetKind().(*PermissionsUpdatePolicy_AndCondition_); ok { + return x.AndCondition + } + return nil +} + +func (x *PermissionsUpdatePolicy) GetAnyCondition() *PermissionsUpdatePolicy_AnyCondition { + if x, ok := x.GetKind().(*PermissionsUpdatePolicy_AnyCondition_); ok { + return x.AnyCondition + } + return nil +} + +type isPermissionsUpdatePolicy_Kind interface { + isPermissionsUpdatePolicy_Kind() +} + +type PermissionsUpdatePolicy_Base struct { + Base PermissionsUpdatePolicy_PermissionsBasePolicy `protobuf:"varint,1,opt,name=base,proto3,enum=xmtp.mls.message_contents.PermissionsUpdatePolicy_PermissionsBasePolicy,oneof"` +} + +type PermissionsUpdatePolicy_AndCondition_ struct { + AndCondition *PermissionsUpdatePolicy_AndCondition `protobuf:"bytes,2,opt,name=and_condition,json=andCondition,proto3,oneof"` +} + +type PermissionsUpdatePolicy_AnyCondition_ struct { + AnyCondition *PermissionsUpdatePolicy_AnyCondition `protobuf:"bytes,3,opt,name=any_condition,json=anyCondition,proto3,oneof"` +} + +func (*PermissionsUpdatePolicy_Base) isPermissionsUpdatePolicy_Kind() {} + +func (*PermissionsUpdatePolicy_AndCondition_) isPermissionsUpdatePolicy_Kind() {} + +func (*PermissionsUpdatePolicy_AnyCondition_) isPermissionsUpdatePolicy_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_permissions_proto_msgTypes[6] + 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_permissions_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 MembershipPolicy_AndCondition.ProtoReflect.Descriptor instead. +func (*MembershipPolicy_AndCondition) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_permissions_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_permissions_proto_msgTypes[7] + 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_permissions_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 MembershipPolicy_AnyCondition.ProtoReflect.Descriptor instead. +func (*MembershipPolicy_AnyCondition) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_permissions_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *MembershipPolicy_AnyCondition) GetPolicies() []*MembershipPolicy { + if x != nil { + return x.Policies + } + return nil +} + +// Combine multiple policies. All must evaluate to true +type MetadataPolicy_AndCondition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Policies []*MetadataPolicy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` +} + +func (x *MetadataPolicy_AndCondition) Reset() { + *x = MetadataPolicy_AndCondition{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_permissions_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetadataPolicy_AndCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataPolicy_AndCondition) ProtoMessage() {} + +func (x *MetadataPolicy_AndCondition) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_permissions_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 MetadataPolicy_AndCondition.ProtoReflect.Descriptor instead. +func (*MetadataPolicy_AndCondition) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_permissions_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *MetadataPolicy_AndCondition) GetPolicies() []*MetadataPolicy { + if x != nil { + return x.Policies + } + return nil +} + +// Combine multiple policies. Any must evaluate to true +type MetadataPolicy_AnyCondition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Policies []*MetadataPolicy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` +} + +func (x *MetadataPolicy_AnyCondition) Reset() { + *x = MetadataPolicy_AnyCondition{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_permissions_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetadataPolicy_AnyCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataPolicy_AnyCondition) ProtoMessage() {} + +func (x *MetadataPolicy_AnyCondition) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_permissions_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 MetadataPolicy_AnyCondition.ProtoReflect.Descriptor instead. +func (*MetadataPolicy_AnyCondition) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_permissions_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *MetadataPolicy_AnyCondition) GetPolicies() []*MetadataPolicy { + if x != nil { + return x.Policies + } + return nil +} + +// Combine multiple policies. All must evaluate to true +type PermissionsUpdatePolicy_AndCondition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Policies []*PermissionsUpdatePolicy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` +} + +func (x *PermissionsUpdatePolicy_AndCondition) Reset() { + *x = PermissionsUpdatePolicy_AndCondition{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_permissions_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PermissionsUpdatePolicy_AndCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PermissionsUpdatePolicy_AndCondition) ProtoMessage() {} + +func (x *PermissionsUpdatePolicy_AndCondition) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_permissions_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 PermissionsUpdatePolicy_AndCondition.ProtoReflect.Descriptor instead. +func (*PermissionsUpdatePolicy_AndCondition) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_permissions_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *PermissionsUpdatePolicy_AndCondition) GetPolicies() []*PermissionsUpdatePolicy { + if x != nil { + return x.Policies + } + return nil +} + +// Combine multiple policies. Any must evaluate to true +type PermissionsUpdatePolicy_AnyCondition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Policies []*PermissionsUpdatePolicy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` +} + +func (x *PermissionsUpdatePolicy_AnyCondition) Reset() { + *x = PermissionsUpdatePolicy_AnyCondition{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_group_permissions_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PermissionsUpdatePolicy_AnyCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PermissionsUpdatePolicy_AnyCondition) ProtoMessage() {} + +func (x *PermissionsUpdatePolicy_AnyCondition) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_group_permissions_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 PermissionsUpdatePolicy_AnyCondition.ProtoReflect.Descriptor instead. +func (*PermissionsUpdatePolicy_AnyCondition) Descriptor() ([]byte, []int) { + return file_mls_message_contents_group_permissions_proto_rawDescGZIP(), []int{4, 1} +} + +func (x *PermissionsUpdatePolicy_AnyCondition) GetPolicies() []*PermissionsUpdatePolicy { + if x != nil { + return x.Policies + } + return nil +} + +var File_mls_message_contents_group_permissions_proto protoreflect.FileDescriptor + +var file_mls_message_contents_group_permissions_proto_rawDesc = []byte{ + 0x0a, 0x2c, 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, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 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, 0x5d, 0x0a, 0x19, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x31, 0x12, 0x40, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x18, 0x01, 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, 0xdf, 0x05, 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, 0x12, 0x74, + 0x0a, 0x16, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, + 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, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5c, 0x0a, 0x10, 0x61, 0x64, 0x64, 0x5f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, + 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, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x0e, 0x61, 0x64, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x62, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x32, 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, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x6e, 0x0a, 0x19, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 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, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x17, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x72, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 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, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8a, 0x05, 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, 0xab, 0x01, 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, 0x2d, 0x0a, 0x29, 0x42, 0x41, + 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, + 0x49, 0x46, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x4f, 0x52, 0x5f, 0x53, 0x55, 0x50, 0x45, + 0x52, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x03, 0x12, 0x24, 0x0a, 0x20, 0x42, 0x41, 0x53, + 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x49, + 0x46, 0x5f, 0x53, 0x55, 0x50, 0x45, 0x52, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x04, 0x42, + 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xac, 0x05, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x52, 0x0a, 0x04, 0x62, 0x61, + 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 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, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x61, 0x73, 0x65, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x5d, + 0x0a, 0x0d, 0x61, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 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, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 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, 0x5d, 0x0a, + 0x0d, 0x61, 0x6e, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 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, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 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, 0x55, 0x0a, 0x0c, + 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x08, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, + 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, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x69, 0x65, 0x73, 0x1a, 0x55, 0x0a, 0x0c, 0x41, 0x6e, 0x79, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 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, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0xd1, 0x01, 0x0a, 0x12, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x61, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x12, 0x24, 0x0a, 0x20, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 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, 0x1e, 0x0a, 0x1a, 0x4d, 0x45, 0x54, 0x41, 0x44, + 0x41, 0x54, 0x41, 0x5f, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, + 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x4d, 0x45, 0x54, 0x41, 0x44, + 0x41, 0x54, 0x41, 0x5f, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, + 0x44, 0x45, 0x4e, 0x59, 0x10, 0x02, 0x12, 0x27, 0x0a, 0x23, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, + 0x54, 0x41, 0x5f, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, + 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x03, 0x12, + 0x2d, 0x0a, 0x29, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x42, 0x41, 0x53, 0x45, + 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x46, + 0x5f, 0x53, 0x55, 0x50, 0x45, 0x52, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x04, 0x42, 0x06, + 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xd4, 0x05, 0x0a, 0x17, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x5e, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x48, 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, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x42, 0x61, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x48, 0x00, 0x52, 0x04, 0x62, 0x61, + 0x73, 0x65, 0x12, 0x66, 0x0a, 0x0d, 0x61, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 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, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 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, 0x66, 0x0a, 0x0d, 0x61, 0x6e, + 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3f, 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, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 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, 0x5e, 0x0a, 0x0c, 0x41, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 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, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x1a, 0x5e, 0x0a, 0x0c, 0x41, 0x6e, 0x79, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 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, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x22, 0xc0, 0x01, 0x0a, 0x15, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x42, 0x61, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x27, 0x0a, 0x23, + 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 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, 0x20, 0x0a, 0x1c, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, + 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, + 0x5f, 0x44, 0x45, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x2a, 0x0a, 0x26, 0x50, 0x45, 0x52, 0x4d, 0x49, + 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, + 0x43, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x44, 0x4d, 0x49, + 0x4e, 0x10, 0x02, 0x12, 0x30, 0x0a, 0x2c, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, + 0x4e, 0x53, 0x5f, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, + 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x46, 0x5f, 0x53, 0x55, 0x50, 0x45, 0x52, 0x5f, 0x41, 0x44, + 0x4d, 0x49, 0x4e, 0x10, 0x03, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x42, 0xee, 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, + 0x15, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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_permissions_proto_rawDescOnce sync.Once + file_mls_message_contents_group_permissions_proto_rawDescData = file_mls_message_contents_group_permissions_proto_rawDesc +) + +func file_mls_message_contents_group_permissions_proto_rawDescGZIP() []byte { + file_mls_message_contents_group_permissions_proto_rawDescOnce.Do(func() { + file_mls_message_contents_group_permissions_proto_rawDescData = protoimpl.X.CompressGZIP(file_mls_message_contents_group_permissions_proto_rawDescData) + }) + return file_mls_message_contents_group_permissions_proto_rawDescData +} + +var file_mls_message_contents_group_permissions_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_mls_message_contents_group_permissions_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_mls_message_contents_group_permissions_proto_goTypes = []any{ + (MembershipPolicy_BasePolicy)(0), // 0: xmtp.mls.message_contents.MembershipPolicy.BasePolicy + (MetadataPolicy_MetadataBasePolicy)(0), // 1: xmtp.mls.message_contents.MetadataPolicy.MetadataBasePolicy + (PermissionsUpdatePolicy_PermissionsBasePolicy)(0), // 2: xmtp.mls.message_contents.PermissionsUpdatePolicy.PermissionsBasePolicy + (*GroupMutablePermissionsV1)(nil), // 3: xmtp.mls.message_contents.GroupMutablePermissionsV1 + (*PolicySet)(nil), // 4: xmtp.mls.message_contents.PolicySet + (*MembershipPolicy)(nil), // 5: xmtp.mls.message_contents.MembershipPolicy + (*MetadataPolicy)(nil), // 6: xmtp.mls.message_contents.MetadataPolicy + (*PermissionsUpdatePolicy)(nil), // 7: xmtp.mls.message_contents.PermissionsUpdatePolicy + nil, // 8: xmtp.mls.message_contents.PolicySet.UpdateMetadataPolicyEntry + (*MembershipPolicy_AndCondition)(nil), // 9: xmtp.mls.message_contents.MembershipPolicy.AndCondition + (*MembershipPolicy_AnyCondition)(nil), // 10: xmtp.mls.message_contents.MembershipPolicy.AnyCondition + (*MetadataPolicy_AndCondition)(nil), // 11: xmtp.mls.message_contents.MetadataPolicy.AndCondition + (*MetadataPolicy_AnyCondition)(nil), // 12: xmtp.mls.message_contents.MetadataPolicy.AnyCondition + (*PermissionsUpdatePolicy_AndCondition)(nil), // 13: xmtp.mls.message_contents.PermissionsUpdatePolicy.AndCondition + (*PermissionsUpdatePolicy_AnyCondition)(nil), // 14: xmtp.mls.message_contents.PermissionsUpdatePolicy.AnyCondition +} +var file_mls_message_contents_group_permissions_proto_depIdxs = []int32{ + 4, // 0: xmtp.mls.message_contents.GroupMutablePermissionsV1.policies:type_name -> xmtp.mls.message_contents.PolicySet + 5, // 1: xmtp.mls.message_contents.PolicySet.add_member_policy:type_name -> xmtp.mls.message_contents.MembershipPolicy + 5, // 2: xmtp.mls.message_contents.PolicySet.remove_member_policy:type_name -> xmtp.mls.message_contents.MembershipPolicy + 8, // 3: xmtp.mls.message_contents.PolicySet.update_metadata_policy:type_name -> xmtp.mls.message_contents.PolicySet.UpdateMetadataPolicyEntry + 7, // 4: xmtp.mls.message_contents.PolicySet.add_admin_policy:type_name -> xmtp.mls.message_contents.PermissionsUpdatePolicy + 7, // 5: xmtp.mls.message_contents.PolicySet.remove_admin_policy:type_name -> xmtp.mls.message_contents.PermissionsUpdatePolicy + 7, // 6: xmtp.mls.message_contents.PolicySet.update_permissions_policy:type_name -> xmtp.mls.message_contents.PermissionsUpdatePolicy + 0, // 7: xmtp.mls.message_contents.MembershipPolicy.base:type_name -> xmtp.mls.message_contents.MembershipPolicy.BasePolicy + 9, // 8: xmtp.mls.message_contents.MembershipPolicy.and_condition:type_name -> xmtp.mls.message_contents.MembershipPolicy.AndCondition + 10, // 9: xmtp.mls.message_contents.MembershipPolicy.any_condition:type_name -> xmtp.mls.message_contents.MembershipPolicy.AnyCondition + 1, // 10: xmtp.mls.message_contents.MetadataPolicy.base:type_name -> xmtp.mls.message_contents.MetadataPolicy.MetadataBasePolicy + 11, // 11: xmtp.mls.message_contents.MetadataPolicy.and_condition:type_name -> xmtp.mls.message_contents.MetadataPolicy.AndCondition + 12, // 12: xmtp.mls.message_contents.MetadataPolicy.any_condition:type_name -> xmtp.mls.message_contents.MetadataPolicy.AnyCondition + 2, // 13: xmtp.mls.message_contents.PermissionsUpdatePolicy.base:type_name -> xmtp.mls.message_contents.PermissionsUpdatePolicy.PermissionsBasePolicy + 13, // 14: xmtp.mls.message_contents.PermissionsUpdatePolicy.and_condition:type_name -> xmtp.mls.message_contents.PermissionsUpdatePolicy.AndCondition + 14, // 15: xmtp.mls.message_contents.PermissionsUpdatePolicy.any_condition:type_name -> xmtp.mls.message_contents.PermissionsUpdatePolicy.AnyCondition + 6, // 16: xmtp.mls.message_contents.PolicySet.UpdateMetadataPolicyEntry.value:type_name -> xmtp.mls.message_contents.MetadataPolicy + 5, // 17: xmtp.mls.message_contents.MembershipPolicy.AndCondition.policies:type_name -> xmtp.mls.message_contents.MembershipPolicy + 5, // 18: xmtp.mls.message_contents.MembershipPolicy.AnyCondition.policies:type_name -> xmtp.mls.message_contents.MembershipPolicy + 6, // 19: xmtp.mls.message_contents.MetadataPolicy.AndCondition.policies:type_name -> xmtp.mls.message_contents.MetadataPolicy + 6, // 20: xmtp.mls.message_contents.MetadataPolicy.AnyCondition.policies:type_name -> xmtp.mls.message_contents.MetadataPolicy + 7, // 21: xmtp.mls.message_contents.PermissionsUpdatePolicy.AndCondition.policies:type_name -> xmtp.mls.message_contents.PermissionsUpdatePolicy + 7, // 22: xmtp.mls.message_contents.PermissionsUpdatePolicy.AnyCondition.policies:type_name -> xmtp.mls.message_contents.PermissionsUpdatePolicy + 23, // [23:23] is the sub-list for method output_type + 23, // [23:23] 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_message_contents_group_permissions_proto_init() } +func file_mls_message_contents_group_permissions_proto_init() { + if File_mls_message_contents_group_permissions_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mls_message_contents_group_permissions_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GroupMutablePermissionsV1); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_group_permissions_proto_msgTypes[1].Exporter = func(v any, i int) any { + 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_permissions_proto_msgTypes[2].Exporter = func(v any, i int) any { + 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_permissions_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*MetadataPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_group_permissions_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*PermissionsUpdatePolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mls_message_contents_group_permissions_proto_msgTypes[6].Exporter = func(v any, i int) any { + 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_permissions_proto_msgTypes[7].Exporter = func(v any, i int) any { + 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_permissions_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*MetadataPolicy_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_permissions_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*MetadataPolicy_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_permissions_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*PermissionsUpdatePolicy_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_permissions_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*PermissionsUpdatePolicy_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_permissions_proto_msgTypes[2].OneofWrappers = []any{ + (*MembershipPolicy_Base)(nil), + (*MembershipPolicy_AndCondition_)(nil), + (*MembershipPolicy_AnyCondition_)(nil), + } + file_mls_message_contents_group_permissions_proto_msgTypes[3].OneofWrappers = []any{ + (*MetadataPolicy_Base)(nil), + (*MetadataPolicy_AndCondition_)(nil), + (*MetadataPolicy_AnyCondition_)(nil), + } + file_mls_message_contents_group_permissions_proto_msgTypes[4].OneofWrappers = []any{ + (*PermissionsUpdatePolicy_Base)(nil), + (*PermissionsUpdatePolicy_AndCondition_)(nil), + (*PermissionsUpdatePolicy_AnyCondition_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mls_message_contents_group_permissions_proto_rawDesc, + NumEnums: 3, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mls_message_contents_group_permissions_proto_goTypes, + DependencyIndexes: file_mls_message_contents_group_permissions_proto_depIdxs, + EnumInfos: file_mls_message_contents_group_permissions_proto_enumTypes, + MessageInfos: file_mls_message_contents_group_permissions_proto_msgTypes, + }.Build() + File_mls_message_contents_group_permissions_proto = out.File + file_mls_message_contents_group_permissions_proto_rawDesc = nil + file_mls_message_contents_group_permissions_proto_goTypes = nil + file_mls_message_contents_group_permissions_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..e6615f7b --- /dev/null +++ b/pkg/proto/mls/message_contents/transcript_messages.pb.go @@ -0,0 +1,572 @@ +// Message content encoding structures + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// 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 +} + +// A summary of the changes in a commit. +// Includes added/removed inboxes and changes to metadata +type GroupUpdated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InitiatedByInboxId string `protobuf:"bytes,1,opt,name=initiated_by_inbox_id,json=initiatedByInboxId,proto3" json:"initiated_by_inbox_id,omitempty"` + // The inboxes added in the commit + AddedInboxes []*GroupUpdated_Inbox `protobuf:"bytes,2,rep,name=added_inboxes,json=addedInboxes,proto3" json:"added_inboxes,omitempty"` + // The inboxes removed in the commit + RemovedInboxes []*GroupUpdated_Inbox `protobuf:"bytes,3,rep,name=removed_inboxes,json=removedInboxes,proto3" json:"removed_inboxes,omitempty"` + // The metadata changes in the commit + MetadataFieldChanges []*GroupUpdated_MetadataFieldChange `protobuf:"bytes,4,rep,name=metadata_field_changes,json=metadataFieldChanges,proto3" json:"metadata_field_changes,omitempty"` +} + +func (x *GroupUpdated) Reset() { + *x = GroupUpdated{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_transcript_messages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupUpdated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupUpdated) ProtoMessage() {} + +func (x *GroupUpdated) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_transcript_messages_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 GroupUpdated.ProtoReflect.Descriptor instead. +func (*GroupUpdated) Descriptor() ([]byte, []int) { + return file_mls_message_contents_transcript_messages_proto_rawDescGZIP(), []int{2} +} + +func (x *GroupUpdated) GetInitiatedByInboxId() string { + if x != nil { + return x.InitiatedByInboxId + } + return "" +} + +func (x *GroupUpdated) GetAddedInboxes() []*GroupUpdated_Inbox { + if x != nil { + return x.AddedInboxes + } + return nil +} + +func (x *GroupUpdated) GetRemovedInboxes() []*GroupUpdated_Inbox { + if x != nil { + return x.RemovedInboxes + } + return nil +} + +func (x *GroupUpdated) GetMetadataFieldChanges() []*GroupUpdated_MetadataFieldChange { + if x != nil { + return x.MetadataFieldChanges + } + return nil +} + +// An inbox that was added or removed in this commit +type GroupUpdated_Inbox struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InboxId string `protobuf:"bytes,1,opt,name=inbox_id,json=inboxId,proto3" json:"inbox_id,omitempty"` +} + +func (x *GroupUpdated_Inbox) Reset() { + *x = GroupUpdated_Inbox{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_transcript_messages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupUpdated_Inbox) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupUpdated_Inbox) ProtoMessage() {} + +func (x *GroupUpdated_Inbox) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_transcript_messages_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 GroupUpdated_Inbox.ProtoReflect.Descriptor instead. +func (*GroupUpdated_Inbox) Descriptor() ([]byte, []int) { + return file_mls_message_contents_transcript_messages_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *GroupUpdated_Inbox) GetInboxId() string { + if x != nil { + return x.InboxId + } + return "" +} + +// A summary of a change to the mutable metadata +type GroupUpdated_MetadataFieldChange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The field that was changed + FieldName string `protobuf:"bytes,1,opt,name=field_name,json=fieldName,proto3" json:"field_name,omitempty"` + // The previous value + OldValue *string `protobuf:"bytes,2,opt,name=old_value,json=oldValue,proto3,oneof" json:"old_value,omitempty"` + // The updated value + NewValue *string `protobuf:"bytes,3,opt,name=new_value,json=newValue,proto3,oneof" json:"new_value,omitempty"` +} + +func (x *GroupUpdated_MetadataFieldChange) Reset() { + *x = GroupUpdated_MetadataFieldChange{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_message_contents_transcript_messages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupUpdated_MetadataFieldChange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupUpdated_MetadataFieldChange) ProtoMessage() {} + +func (x *GroupUpdated_MetadataFieldChange) ProtoReflect() protoreflect.Message { + mi := &file_mls_message_contents_transcript_messages_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 GroupUpdated_MetadataFieldChange.ProtoReflect.Descriptor instead. +func (*GroupUpdated_MetadataFieldChange) Descriptor() ([]byte, []int) { + return file_mls_message_contents_transcript_messages_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *GroupUpdated_MetadataFieldChange) GetFieldName() string { + if x != nil { + return x.FieldName + } + return "" +} + +func (x *GroupUpdated_MetadataFieldChange) GetOldValue() string { + if x != nil && x.OldValue != nil { + return *x.OldValue + } + return "" +} + +func (x *GroupUpdated_MetadataFieldChange) GetNewValue() string { + if x != nil && x.NewValue != nil { + return *x.NewValue + } + return "" +} + +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, 0x22, 0x9b, 0x04, 0x0a, 0x0c, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x15, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x74, 0x65, 0x64, 0x42, 0x79, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x52, 0x0a, 0x0d, + 0x61, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2d, 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, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x62, + 0x6f, 0x78, 0x52, 0x0c, 0x61, 0x64, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, + 0x12, 0x56, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x62, 0x6f, + 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 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, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x64, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x16, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 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, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x1a, 0x22, 0x0a, 0x05, 0x49, + 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x1a, + 0x94, 0x01, 0x0a, 0x13, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x6f, 0x6c, 0x64, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x6f, 0x6c, 0x64, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x6e, + 0x65, 0x77, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6f, + 0x6c, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x65, 0x77, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 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, 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, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x64, 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, 5) +var file_mls_message_contents_transcript_messages_proto_goTypes = []any{ + (*MembershipChange)(nil), // 0: xmtp.mls.message_contents.MembershipChange + (*GroupMembershipChanges)(nil), // 1: xmtp.mls.message_contents.GroupMembershipChanges + (*GroupUpdated)(nil), // 2: xmtp.mls.message_contents.GroupUpdated + (*GroupUpdated_Inbox)(nil), // 3: xmtp.mls.message_contents.GroupUpdated.Inbox + (*GroupUpdated_MetadataFieldChange)(nil), // 4: xmtp.mls.message_contents.GroupUpdated.MetadataFieldChange +} +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 + 3, // 4: xmtp.mls.message_contents.GroupUpdated.added_inboxes:type_name -> xmtp.mls.message_contents.GroupUpdated.Inbox + 3, // 5: xmtp.mls.message_contents.GroupUpdated.removed_inboxes:type_name -> xmtp.mls.message_contents.GroupUpdated.Inbox + 4, // 6: xmtp.mls.message_contents.GroupUpdated.metadata_field_changes:type_name -> xmtp.mls.message_contents.GroupUpdated.MetadataFieldChange + 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_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 any, i int) any { + 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 any, i int) any { + switch v := v.(*GroupMembershipChanges); 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[2].Exporter = func(v any, i int) any { + switch v := v.(*GroupUpdated); 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[3].Exporter = func(v any, i int) any { + switch v := v.(*GroupUpdated_Inbox); 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[4].Exporter = func(v any, i int) any { + switch v := v.(*GroupUpdated_MetadataFieldChange); 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[4].OneofWrappers = []any{} + 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: 5, + 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..d73c0a5c --- /dev/null +++ b/pkg/proto/mls_validation/v1/service.pb.go @@ -0,0 +1,1452 @@ +// Message API + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: mls_validation/v1/service.proto + +package mls_validationv1 + +import ( + identity "github.com/xmtp/xmtpd/pkg/proto/identity" + associations "github.com/xmtp/xmtpd/pkg/proto/identity/associations" + 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) +) + +// Validates a Inbox-ID Key Package Type +type ValidateInboxIdKeyPackagesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Responses []*ValidateInboxIdKeyPackagesResponse_Response `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *ValidateInboxIdKeyPackagesResponse) Reset() { + *x = ValidateInboxIdKeyPackagesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateInboxIdKeyPackagesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateInboxIdKeyPackagesResponse) ProtoMessage() {} + +func (x *ValidateInboxIdKeyPackagesResponse) 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 ValidateInboxIdKeyPackagesResponse.ProtoReflect.Descriptor instead. +func (*ValidateInboxIdKeyPackagesResponse) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{0} +} + +func (x *ValidateInboxIdKeyPackagesResponse) GetResponses() []*ValidateInboxIdKeyPackagesResponse_Response { + if x != nil { + return x.Responses + } + return nil +} + +// 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[1] + 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[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 ValidateKeyPackagesRequest.ProtoReflect.Descriptor instead. +func (*ValidateKeyPackagesRequest) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{1} +} + +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[2] + 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[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 ValidateKeyPackagesResponse.ProtoReflect.Descriptor instead. +func (*ValidateKeyPackagesResponse) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{2} +} + +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[3] + 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[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 ValidateGroupMessagesRequest.ProtoReflect.Descriptor instead. +func (*ValidateGroupMessagesRequest) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{3} +} + +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[4] + 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[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 ValidateGroupMessagesResponse.ProtoReflect.Descriptor instead. +func (*ValidateGroupMessagesResponse) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ValidateGroupMessagesResponse) GetResponses() []*ValidateGroupMessagesResponse_ValidationResponse { + if x != nil { + return x.Responses + } + return nil +} + +// Request to get a final association state for identity updates +type GetAssociationStateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of identity updates + OldUpdates []*associations.IdentityUpdate `protobuf:"bytes,1,rep,name=old_updates,json=oldUpdates,proto3" json:"old_updates,omitempty"` + NewUpdates []*associations.IdentityUpdate `protobuf:"bytes,2,rep,name=new_updates,json=newUpdates,proto3" json:"new_updates,omitempty"` +} + +func (x *GetAssociationStateRequest) Reset() { + *x = GetAssociationStateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAssociationStateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAssociationStateRequest) ProtoMessage() {} + +func (x *GetAssociationStateRequest) 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 GetAssociationStateRequest.ProtoReflect.Descriptor instead. +func (*GetAssociationStateRequest) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{5} +} + +func (x *GetAssociationStateRequest) GetOldUpdates() []*associations.IdentityUpdate { + if x != nil { + return x.OldUpdates + } + return nil +} + +func (x *GetAssociationStateRequest) GetNewUpdates() []*associations.IdentityUpdate { + if x != nil { + return x.NewUpdates + } + return nil +} + +// Response to GetAssociationStateRequest, containing the final association state +// for an InboxID +type GetAssociationStateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AssociationState *associations.AssociationState `protobuf:"bytes,1,opt,name=association_state,json=associationState,proto3" json:"association_state,omitempty"` + StateDiff *associations.AssociationStateDiff `protobuf:"bytes,2,opt,name=state_diff,json=stateDiff,proto3" json:"state_diff,omitempty"` +} + +func (x *GetAssociationStateResponse) Reset() { + *x = GetAssociationStateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAssociationStateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAssociationStateResponse) ProtoMessage() {} + +func (x *GetAssociationStateResponse) 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 GetAssociationStateResponse.ProtoReflect.Descriptor instead. +func (*GetAssociationStateResponse) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{6} +} + +func (x *GetAssociationStateResponse) GetAssociationState() *associations.AssociationState { + if x != nil { + return x.AssociationState + } + return nil +} + +func (x *GetAssociationStateResponse) GetStateDiff() *associations.AssociationStateDiff { + if x != nil { + return x.StateDiff + } + return nil +} + +// Request to validate an InboxID with the backend service. Ensures an Inbox Id <> Installation key are valid. +type ValidateInboxIdsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // list of validation requests + Requests []*ValidateInboxIdsRequest_ValidationRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *ValidateInboxIdsRequest) Reset() { + *x = ValidateInboxIdsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateInboxIdsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateInboxIdsRequest) ProtoMessage() {} + +func (x *ValidateInboxIdsRequest) 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 ValidateInboxIdsRequest.ProtoReflect.Descriptor instead. +func (*ValidateInboxIdsRequest) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{7} +} + +func (x *ValidateInboxIdsRequest) GetRequests() []*ValidateInboxIdsRequest_ValidationRequest { + if x != nil { + return x.Requests + } + return nil +} + +// Response to ValidateInboxIdRequest +type ValidateInboxIdsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of validation responses + Responses []*ValidateInboxIdsResponse_ValidationResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` +} + +func (x *ValidateInboxIdsResponse) Reset() { + *x = ValidateInboxIdsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateInboxIdsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateInboxIdsResponse) ProtoMessage() {} + +func (x *ValidateInboxIdsResponse) ProtoReflect() protoreflect.Message { + mi := &file_mls_validation_v1_service_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 ValidateInboxIdsResponse.ProtoReflect.Descriptor instead. +func (*ValidateInboxIdsResponse) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{8} +} + +func (x *ValidateInboxIdsResponse) GetResponses() []*ValidateInboxIdsResponse_ValidationResponse { + if x != nil { + return x.Responses + } + return nil +} + +// one response corresponding to information about one key package +type ValidateInboxIdKeyPackagesResponse_Response 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"` + Credential *identity.MlsCredential `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"` + InstallationPublicKey []byte `protobuf:"bytes,4,opt,name=installation_public_key,json=installationPublicKey,proto3" json:"installation_public_key,omitempty"` + Expiration uint64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"` +} + +func (x *ValidateInboxIdKeyPackagesResponse_Response) Reset() { + *x = ValidateInboxIdKeyPackagesResponse_Response{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateInboxIdKeyPackagesResponse_Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateInboxIdKeyPackagesResponse_Response) ProtoMessage() {} + +func (x *ValidateInboxIdKeyPackagesResponse_Response) ProtoReflect() protoreflect.Message { + mi := &file_mls_validation_v1_service_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 ValidateInboxIdKeyPackagesResponse_Response.ProtoReflect.Descriptor instead. +func (*ValidateInboxIdKeyPackagesResponse_Response) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ValidateInboxIdKeyPackagesResponse_Response) GetIsOk() bool { + if x != nil { + return x.IsOk + } + return false +} + +func (x *ValidateInboxIdKeyPackagesResponse_Response) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *ValidateInboxIdKeyPackagesResponse_Response) GetCredential() *identity.MlsCredential { + if x != nil { + return x.Credential + } + return nil +} + +func (x *ValidateInboxIdKeyPackagesResponse_Response) GetInstallationPublicKey() []byte { + if x != nil { + return x.InstallationPublicKey + } + return nil +} + +func (x *ValidateInboxIdKeyPackagesResponse_Response) GetExpiration() uint64 { + if x != nil { + return x.Expiration + } + return 0 +} + +// 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"` + IsInboxIdCredential bool `protobuf:"varint,2,opt,name=is_inbox_id_credential,json=isInboxIdCredential,proto3" json:"is_inbox_id_credential,omitempty"` +} + +func (x *ValidateKeyPackagesRequest_KeyPackage) Reset() { + *x = ValidateKeyPackagesRequest_KeyPackage{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[10] + 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[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 ValidateKeyPackagesRequest_KeyPackage.ProtoReflect.Descriptor instead. +func (*ValidateKeyPackagesRequest_KeyPackage) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *ValidateKeyPackagesRequest_KeyPackage) GetKeyPackageBytesTlsSerialized() []byte { + if x != nil { + return x.KeyPackageBytesTlsSerialized + } + return nil +} + +func (x *ValidateKeyPackagesRequest_KeyPackage) GetIsInboxIdCredential() bool { + if x != nil { + return x.IsInboxIdCredential + } + return false +} + +// 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[11] + 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[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 ValidateKeyPackagesResponse_ValidationResponse.ProtoReflect.Descriptor instead. +func (*ValidateKeyPackagesResponse_ValidationResponse) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{2, 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[12] + 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[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 ValidateGroupMessagesRequest_GroupMessage.ProtoReflect.Descriptor instead. +func (*ValidateGroupMessagesRequest_GroupMessage) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{3, 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[13] + 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[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 ValidateGroupMessagesResponse_ValidationResponse.ProtoReflect.Descriptor instead. +func (*ValidateGroupMessagesResponse_ValidationResponse) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{4, 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 "" +} + +// a single validation request +type ValidateInboxIdsRequest_ValidationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Credential *identity.MlsCredential `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` + InstallationPublicKey []byte `protobuf:"bytes,2,opt,name=installation_public_key,json=installationPublicKey,proto3" json:"installation_public_key,omitempty"` + IdentityUpdates []*associations.IdentityUpdate `protobuf:"bytes,3,rep,name=identity_updates,json=identityUpdates,proto3" json:"identity_updates,omitempty"` +} + +func (x *ValidateInboxIdsRequest_ValidationRequest) Reset() { + *x = ValidateInboxIdsRequest_ValidationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateInboxIdsRequest_ValidationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateInboxIdsRequest_ValidationRequest) ProtoMessage() {} + +func (x *ValidateInboxIdsRequest_ValidationRequest) ProtoReflect() protoreflect.Message { + mi := &file_mls_validation_v1_service_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 ValidateInboxIdsRequest_ValidationRequest.ProtoReflect.Descriptor instead. +func (*ValidateInboxIdsRequest_ValidationRequest) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *ValidateInboxIdsRequest_ValidationRequest) GetCredential() *identity.MlsCredential { + if x != nil { + return x.Credential + } + return nil +} + +func (x *ValidateInboxIdsRequest_ValidationRequest) GetInstallationPublicKey() []byte { + if x != nil { + return x.InstallationPublicKey + } + return nil +} + +func (x *ValidateInboxIdsRequest_ValidationRequest) GetIdentityUpdates() []*associations.IdentityUpdate { + if x != nil { + return x.IdentityUpdates + } + return nil +} + +// a single validation response +type ValidateInboxIdsResponse_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"` + InboxId string `protobuf:"bytes,3,opt,name=inbox_id,json=inboxId,proto3" json:"inbox_id,omitempty"` +} + +func (x *ValidateInboxIdsResponse_ValidationResponse) Reset() { + *x = ValidateInboxIdsResponse_ValidationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mls_validation_v1_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateInboxIdsResponse_ValidationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateInboxIdsResponse_ValidationResponse) ProtoMessage() {} + +func (x *ValidateInboxIdsResponse_ValidationResponse) ProtoReflect() protoreflect.Message { + mi := &file_mls_validation_v1_service_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 ValidateInboxIdsResponse_ValidationResponse.ProtoReflect.Descriptor instead. +func (*ValidateInboxIdsResponse_ValidationResponse) Descriptor() ([]byte, []int) { + return file_mls_validation_v1_service_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *ValidateInboxIdsResponse_ValidationResponse) GetIsOk() bool { + if x != nil { + return x.IsOk + } + return false +} + +func (x *ValidateInboxIdsResponse_ValidationResponse) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *ValidateInboxIdsResponse_ValidationResponse) GetInboxId() string { + if x != nil { + return x.InboxId + } + 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, 0x1a, 0x27, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x2f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x63, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe4, 0x02, + 0x0a, 0x22, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, + 0x64, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 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, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, + 0x4b, 0x65, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 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, 0xda, 0x01, 0x0a, 0x08, 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, 0x3c, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x2e, 0x4d, 0x6c, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x52, 0x0a, 0x63, 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, 0x04, 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, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8a, 0x02, 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, 0x89, 0x01, 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, 0x12, 0x33, 0x0a, 0x16, + 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x69, 0x73, + 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 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, 0x22, 0xb6, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x0a, 0x6f, 0x6c, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x4b, + 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x0a, 0x6e, 0x65, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x22, 0xc9, 0x01, 0x0a, 0x1b, + 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x11, 0x61, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x10, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x64, 0x69, 0x66, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x52, 0x09, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x22, 0xdb, 0x02, 0x0a, 0x17, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x5d, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x73, 0x1a, 0xe0, 0x01, 0x0a, 0x11, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x4d, 0x6c, 0x73, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x0a, 0x63, 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, 0x02, 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, 0x55, + 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x73, 0x22, 0xe8, 0x01, 0x0a, 0x18, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x61, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 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, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 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, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, + 0x32, 0xa8, 0x05, 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, 0x12, 0x80, + 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 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, + 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x65, 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, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x8e, 0x01, 0x0a, 0x1a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, + 0x62, 0x6f, 0x78, 0x49, 0x64, 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, 0x3a, 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, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x4b, 0x65, 0x79, + 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x77, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, + 0x62, 0x6f, 0x78, 0x49, 0x64, 0x73, 0x12, 0x2f, 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, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 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, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x49, 0x64, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xe4, 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, 0x42, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, 0x78, 0x6d, 0x74, 0x70, + 0x64, 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, 16) +var file_mls_validation_v1_service_proto_goTypes = []any{ + (*ValidateInboxIdKeyPackagesResponse)(nil), // 0: xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesResponse + (*ValidateKeyPackagesRequest)(nil), // 1: xmtp.mls_validation.v1.ValidateKeyPackagesRequest + (*ValidateKeyPackagesResponse)(nil), // 2: xmtp.mls_validation.v1.ValidateKeyPackagesResponse + (*ValidateGroupMessagesRequest)(nil), // 3: xmtp.mls_validation.v1.ValidateGroupMessagesRequest + (*ValidateGroupMessagesResponse)(nil), // 4: xmtp.mls_validation.v1.ValidateGroupMessagesResponse + (*GetAssociationStateRequest)(nil), // 5: xmtp.mls_validation.v1.GetAssociationStateRequest + (*GetAssociationStateResponse)(nil), // 6: xmtp.mls_validation.v1.GetAssociationStateResponse + (*ValidateInboxIdsRequest)(nil), // 7: xmtp.mls_validation.v1.ValidateInboxIdsRequest + (*ValidateInboxIdsResponse)(nil), // 8: xmtp.mls_validation.v1.ValidateInboxIdsResponse + (*ValidateInboxIdKeyPackagesResponse_Response)(nil), // 9: xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesResponse.Response + (*ValidateKeyPackagesRequest_KeyPackage)(nil), // 10: xmtp.mls_validation.v1.ValidateKeyPackagesRequest.KeyPackage + (*ValidateKeyPackagesResponse_ValidationResponse)(nil), // 11: xmtp.mls_validation.v1.ValidateKeyPackagesResponse.ValidationResponse + (*ValidateGroupMessagesRequest_GroupMessage)(nil), // 12: xmtp.mls_validation.v1.ValidateGroupMessagesRequest.GroupMessage + (*ValidateGroupMessagesResponse_ValidationResponse)(nil), // 13: xmtp.mls_validation.v1.ValidateGroupMessagesResponse.ValidationResponse + (*ValidateInboxIdsRequest_ValidationRequest)(nil), // 14: xmtp.mls_validation.v1.ValidateInboxIdsRequest.ValidationRequest + (*ValidateInboxIdsResponse_ValidationResponse)(nil), // 15: xmtp.mls_validation.v1.ValidateInboxIdsResponse.ValidationResponse + (*associations.IdentityUpdate)(nil), // 16: xmtp.identity.associations.IdentityUpdate + (*associations.AssociationState)(nil), // 17: xmtp.identity.associations.AssociationState + (*associations.AssociationStateDiff)(nil), // 18: xmtp.identity.associations.AssociationStateDiff + (*identity.MlsCredential)(nil), // 19: xmtp.identity.MlsCredential +} +var file_mls_validation_v1_service_proto_depIdxs = []int32{ + 9, // 0: xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesResponse.responses:type_name -> xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesResponse.Response + 10, // 1: xmtp.mls_validation.v1.ValidateKeyPackagesRequest.key_packages:type_name -> xmtp.mls_validation.v1.ValidateKeyPackagesRequest.KeyPackage + 11, // 2: xmtp.mls_validation.v1.ValidateKeyPackagesResponse.responses:type_name -> xmtp.mls_validation.v1.ValidateKeyPackagesResponse.ValidationResponse + 12, // 3: xmtp.mls_validation.v1.ValidateGroupMessagesRequest.group_messages:type_name -> xmtp.mls_validation.v1.ValidateGroupMessagesRequest.GroupMessage + 13, // 4: xmtp.mls_validation.v1.ValidateGroupMessagesResponse.responses:type_name -> xmtp.mls_validation.v1.ValidateGroupMessagesResponse.ValidationResponse + 16, // 5: xmtp.mls_validation.v1.GetAssociationStateRequest.old_updates:type_name -> xmtp.identity.associations.IdentityUpdate + 16, // 6: xmtp.mls_validation.v1.GetAssociationStateRequest.new_updates:type_name -> xmtp.identity.associations.IdentityUpdate + 17, // 7: xmtp.mls_validation.v1.GetAssociationStateResponse.association_state:type_name -> xmtp.identity.associations.AssociationState + 18, // 8: xmtp.mls_validation.v1.GetAssociationStateResponse.state_diff:type_name -> xmtp.identity.associations.AssociationStateDiff + 14, // 9: xmtp.mls_validation.v1.ValidateInboxIdsRequest.requests:type_name -> xmtp.mls_validation.v1.ValidateInboxIdsRequest.ValidationRequest + 15, // 10: xmtp.mls_validation.v1.ValidateInboxIdsResponse.responses:type_name -> xmtp.mls_validation.v1.ValidateInboxIdsResponse.ValidationResponse + 19, // 11: xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesResponse.Response.credential:type_name -> xmtp.identity.MlsCredential + 19, // 12: xmtp.mls_validation.v1.ValidateInboxIdsRequest.ValidationRequest.credential:type_name -> xmtp.identity.MlsCredential + 16, // 13: xmtp.mls_validation.v1.ValidateInboxIdsRequest.ValidationRequest.identity_updates:type_name -> xmtp.identity.associations.IdentityUpdate + 1, // 14: xmtp.mls_validation.v1.ValidationApi.ValidateKeyPackages:input_type -> xmtp.mls_validation.v1.ValidateKeyPackagesRequest + 3, // 15: xmtp.mls_validation.v1.ValidationApi.ValidateGroupMessages:input_type -> xmtp.mls_validation.v1.ValidateGroupMessagesRequest + 5, // 16: xmtp.mls_validation.v1.ValidationApi.GetAssociationState:input_type -> xmtp.mls_validation.v1.GetAssociationStateRequest + 1, // 17: xmtp.mls_validation.v1.ValidationApi.ValidateInboxIdKeyPackages:input_type -> xmtp.mls_validation.v1.ValidateKeyPackagesRequest + 7, // 18: xmtp.mls_validation.v1.ValidationApi.ValidateInboxIds:input_type -> xmtp.mls_validation.v1.ValidateInboxIdsRequest + 2, // 19: xmtp.mls_validation.v1.ValidationApi.ValidateKeyPackages:output_type -> xmtp.mls_validation.v1.ValidateKeyPackagesResponse + 4, // 20: xmtp.mls_validation.v1.ValidationApi.ValidateGroupMessages:output_type -> xmtp.mls_validation.v1.ValidateGroupMessagesResponse + 6, // 21: xmtp.mls_validation.v1.ValidationApi.GetAssociationState:output_type -> xmtp.mls_validation.v1.GetAssociationStateResponse + 0, // 22: xmtp.mls_validation.v1.ValidationApi.ValidateInboxIdKeyPackages:output_type -> xmtp.mls_validation.v1.ValidateInboxIdKeyPackagesResponse + 8, // 23: xmtp.mls_validation.v1.ValidationApi.ValidateInboxIds:output_type -> xmtp.mls_validation.v1.ValidateInboxIdsResponse + 19, // [19:24] is the sub-list for method output_type + 14, // [14:19] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] 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 any, i int) any { + switch v := v.(*ValidateInboxIdKeyPackagesResponse); 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 any, i int) any { + 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[2].Exporter = func(v any, i int) any { + 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[3].Exporter = func(v any, i int) any { + 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[4].Exporter = func(v any, i int) any { + 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[5].Exporter = func(v any, i int) any { + switch v := v.(*GetAssociationStateRequest); 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 any, i int) any { + switch v := v.(*GetAssociationStateResponse); 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 any, i int) any { + switch v := v.(*ValidateInboxIdsRequest); 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[8].Exporter = func(v any, i int) any { + switch v := v.(*ValidateInboxIdsResponse); 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[9].Exporter = func(v any, i int) any { + switch v := v.(*ValidateInboxIdKeyPackagesResponse_Response); 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[10].Exporter = func(v any, i int) any { + 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[11].Exporter = func(v any, i int) any { + 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[12].Exporter = func(v any, i int) any { + 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[13].Exporter = func(v any, i int) any { + switch v := v.(*ValidateGroupMessagesResponse_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[14].Exporter = func(v any, i int) any { + switch v := v.(*ValidateInboxIdsRequest_ValidationRequest); 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[15].Exporter = func(v any, i int) any { + switch v := v.(*ValidateInboxIdsResponse_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: 16, + 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..d0c4fb8a --- /dev/null +++ b/pkg/proto/mls_validation/v1/service_grpc.pb.go @@ -0,0 +1,273 @@ +// 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" + ValidationApi_GetAssociationState_FullMethodName = "/xmtp.mls_validation.v1.ValidationApi/GetAssociationState" + ValidationApi_ValidateInboxIdKeyPackages_FullMethodName = "/xmtp.mls_validation.v1.ValidationApi/ValidateInboxIdKeyPackages" + ValidationApi_ValidateInboxIds_FullMethodName = "/xmtp.mls_validation.v1.ValidationApi/ValidateInboxIds" +) + +// 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) + // Gets the final association state for a batch of identity updates + GetAssociationState(ctx context.Context, in *GetAssociationStateRequest, opts ...grpc.CallOption) (*GetAssociationStateResponse, error) + // Validates InboxID key packages and returns credential information for them, without checking + // whether an InboxId <> InstallationPublicKey pair is really valid. + ValidateInboxIdKeyPackages(ctx context.Context, in *ValidateKeyPackagesRequest, opts ...grpc.CallOption) (*ValidateInboxIdKeyPackagesResponse, error) + // Validate an InboxID Key Package + // need public key possibly + ValidateInboxIds(ctx context.Context, in *ValidateInboxIdsRequest, opts ...grpc.CallOption) (*ValidateInboxIdsResponse, 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 +} + +func (c *validationApiClient) GetAssociationState(ctx context.Context, in *GetAssociationStateRequest, opts ...grpc.CallOption) (*GetAssociationStateResponse, error) { + out := new(GetAssociationStateResponse) + err := c.cc.Invoke(ctx, ValidationApi_GetAssociationState_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *validationApiClient) ValidateInboxIdKeyPackages(ctx context.Context, in *ValidateKeyPackagesRequest, opts ...grpc.CallOption) (*ValidateInboxIdKeyPackagesResponse, error) { + out := new(ValidateInboxIdKeyPackagesResponse) + err := c.cc.Invoke(ctx, ValidationApi_ValidateInboxIdKeyPackages_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *validationApiClient) ValidateInboxIds(ctx context.Context, in *ValidateInboxIdsRequest, opts ...grpc.CallOption) (*ValidateInboxIdsResponse, error) { + out := new(ValidateInboxIdsResponse) + err := c.cc.Invoke(ctx, ValidationApi_ValidateInboxIds_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) + // Gets the final association state for a batch of identity updates + GetAssociationState(context.Context, *GetAssociationStateRequest) (*GetAssociationStateResponse, error) + // Validates InboxID key packages and returns credential information for them, without checking + // whether an InboxId <> InstallationPublicKey pair is really valid. + ValidateInboxIdKeyPackages(context.Context, *ValidateKeyPackagesRequest) (*ValidateInboxIdKeyPackagesResponse, error) + // Validate an InboxID Key Package + // need public key possibly + ValidateInboxIds(context.Context, *ValidateInboxIdsRequest) (*ValidateInboxIdsResponse, 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) GetAssociationState(context.Context, *GetAssociationStateRequest) (*GetAssociationStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAssociationState not implemented") +} +func (UnimplementedValidationApiServer) ValidateInboxIdKeyPackages(context.Context, *ValidateKeyPackagesRequest) (*ValidateInboxIdKeyPackagesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateInboxIdKeyPackages not implemented") +} +func (UnimplementedValidationApiServer) ValidateInboxIds(context.Context, *ValidateInboxIdsRequest) (*ValidateInboxIdsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ValidateInboxIds 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) +} + +func _ValidationApi_GetAssociationState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAssociationStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ValidationApiServer).GetAssociationState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ValidationApi_GetAssociationState_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ValidationApiServer).GetAssociationState(ctx, req.(*GetAssociationStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ValidationApi_ValidateInboxIdKeyPackages_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).ValidateInboxIdKeyPackages(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ValidationApi_ValidateInboxIdKeyPackages_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ValidationApiServer).ValidateInboxIdKeyPackages(ctx, req.(*ValidateKeyPackagesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ValidationApi_ValidateInboxIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateInboxIdsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ValidationApiServer).ValidateInboxIds(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ValidationApi_ValidateInboxIds_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ValidationApiServer).ValidateInboxIds(ctx, req.(*ValidateInboxIdsRequest)) + } + 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, + }, + { + MethodName: "GetAssociationState", + Handler: _ValidationApi_GetAssociationState_Handler, + }, + { + MethodName: "ValidateInboxIdKeyPackages", + Handler: _ValidationApi_ValidateInboxIdKeyPackages_Handler, + }, + { + MethodName: "ValidateInboxIds", + Handler: _ValidationApi_ValidateInboxIds_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mls_validation/v1/service.proto", +} diff --git a/pkg/proto/openapi/identity/api/v1/identity.swagger.json b/pkg/proto/openapi/identity/api/v1/identity.swagger.json new file mode 100644 index 00000000..ce2bc819 --- /dev/null +++ b/pkg/proto/openapi/identity/api/v1/identity.swagger.json @@ -0,0 +1,524 @@ +{ + "swagger": "2.0", + "info": { + "title": "IdentityApi", + "version": "1.0" + }, + "tags": [ + { + "name": "IdentityApi" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/identity/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": "IdentityApi_GetIdentityUpdates", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/xmtpidentityapiv1GetIdentityUpdatesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/xmtpidentityapiv1GetIdentityUpdatesRequest" + } + } + ], + "tags": [ + "IdentityApi" + ] + } + }, + "/identity/v1/get-inbox-ids": { + "post": { + "summary": "Retrieve the XIDs for the given addresses", + "operationId": "IdentityApi_GetInboxIds", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetInboxIdsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetInboxIdsRequest" + } + } + ], + "tags": [ + "IdentityApi" + ] + } + }, + "/identity/v1/publish-identity-update": { + "post": { + "summary": "Publishes an identity update for an XID or wallet. An identity update may\nconsist of multiple identity actions that have been batch signed.", + "operationId": "IdentityApi_PublishIdentityUpdate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1PublishIdentityUpdateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1PublishIdentityUpdateRequest" + } + } + ], + "tags": [ + "IdentityApi" + ] + } + } + }, + "definitions": { + "GetIdentityUpdatesResponseIdentityUpdateLog": { + "type": "object", + "properties": { + "sequenceId": { + "type": "string", + "format": "uint64" + }, + "serverTimestampNs": { + "type": "string", + "format": "uint64" + }, + "update": { + "$ref": "#/definitions/associationsIdentityUpdate" + } + }, + "description": "A single entry in the XID log on the server." + }, + "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." + }, + "associationsAddAssociation": { + "type": "object", + "properties": { + "newMemberIdentifier": { + "$ref": "#/definitions/associationsMemberIdentifier" + }, + "existingMemberSignature": { + "$ref": "#/definitions/identityassociationsSignature" + }, + "newMemberSignature": { + "$ref": "#/definitions/identityassociationsSignature" + } + }, + "description": "Adds a new member for an XID - either an addressable member such as a\nwallet, or an installation acting on behalf of an address.\nA key-pair that has been associated with one role MUST not be permitted to be\nassociated with a different role." + }, + "associationsChangeRecoveryAddress": { + "type": "object", + "properties": { + "newRecoveryAddress": { + "type": "string" + }, + "existingRecoveryAddressSignature": { + "$ref": "#/definitions/identityassociationsSignature" + } + }, + "description": "Changes the recovery address for an XID. The recovery address is not required\nto be a member of the XID. In addition to being able to add members, the\nrecovery address can also revoke members." + }, + "associationsCreateInbox": { + "type": "object", + "properties": { + "initialAddress": { + "type": "string" + }, + "nonce": { + "type": "string", + "format": "uint64" + }, + "initialAddressSignature": { + "$ref": "#/definitions/identityassociationsSignature", + "title": "Must be an addressable member" + } + }, + "description": "The first entry of any XID log. The XID must be deterministically derivable\nfrom the address and nonce.\nThe recovery address defaults to the initial associated_address unless\nthere is a subsequent ChangeRecoveryAddress in the log." + }, + "associationsErc1271Signature": { + "type": "object", + "properties": { + "accountId": { + "type": "string", + "title": "CAIP-10\nhttps://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-10.md" + }, + "blockNumber": { + "type": "string", + "format": "uint64", + "title": "Specify the block number to verify the signature against" + }, + "signature": { + "type": "string", + "format": "byte", + "title": "The actual signature bytes" + } + }, + "title": "Smart wallet signature" + }, + "associationsIdentityAction": { + "type": "object", + "properties": { + "createInbox": { + "$ref": "#/definitions/associationsCreateInbox" + }, + "add": { + "$ref": "#/definitions/associationsAddAssociation" + }, + "revoke": { + "$ref": "#/definitions/associationsRevokeAssociation" + }, + "changeRecoveryAddress": { + "$ref": "#/definitions/associationsChangeRecoveryAddress" + } + }, + "title": "A single identity operation" + }, + "associationsIdentityUpdate": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/associationsIdentityAction" + } + }, + "clientTimestampNs": { + "type": "string", + "format": "uint64" + }, + "inboxId": { + "type": "string" + } + }, + "description": "One or more identity actions that were signed together.\nExample: [CreateXid, AddAssociation, ChangeRecoveryAddress]\n1. The batched signature text is created by concatenating the signature text\n of each association together with a separator, '\\n\\n\\n'.\n2. The user signs this concatenated result.\n3. The resulting signature is added to each association proto where relevant.\n The same signature may be used for multiple associations in the array." + }, + "associationsLegacyDelegatedSignature": { + "type": "object", + "properties": { + "delegatedKey": { + "$ref": "#/definitions/message_contentsSignedPublicKey" + }, + "signature": { + "$ref": "#/definitions/identityassociationsRecoverableEcdsaSignature" + } + }, + "description": "An existing address on xmtpv2 may have already signed a legacy identity key\nof type SignedPublicKey via the 'Create Identity' signature.\nFor migration to xmtpv3, the legacy key is permitted to sign on behalf of the\naddress to create a matching xmtpv3 installation key.\nThis signature type can ONLY be used for CreateXid and AddAssociation\npayloads, and can only be used once in xmtpv3." + }, + "associationsMemberIdentifier": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "installationPublicKey": { + "type": "string", + "format": "byte" + } + }, + "title": "The identifier for a member of an XID" + }, + "associationsRecoverableEd25519Signature": { + "type": "object", + "properties": { + "bytes": { + "type": "string", + "format": "byte", + "title": "64 bytes [R(32 bytes) || S(32 bytes)]" + }, + "publicKey": { + "type": "string", + "format": "byte", + "title": "32 bytes" + } + }, + "title": "EdDSA signature for 25519" + }, + "associationsRevokeAssociation": { + "type": "object", + "properties": { + "memberToRevoke": { + "$ref": "#/definitions/associationsMemberIdentifier" + }, + "recoveryAddressSignature": { + "$ref": "#/definitions/identityassociationsSignature" + } + }, + "description": "Revokes a member from an XID. The recovery address must sign the revocation." + }, + "identityassociationsRecoverableEcdsaSignature": { + "type": "object", + "properties": { + "bytes": { + "type": "string", + "format": "byte", + "title": "65-bytes [ R || S || V ], with recovery id as the last byte" + } + }, + "title": "RecoverableEcdsaSignature for EIP-191 and V2 signatures" + }, + "identityassociationsSignature": { + "type": "object", + "properties": { + "erc191": { + "$ref": "#/definitions/identityassociationsRecoverableEcdsaSignature" + }, + "erc1271": { + "$ref": "#/definitions/associationsErc1271Signature" + }, + "installationKey": { + "$ref": "#/definitions/associationsRecoverableEd25519Signature" + }, + "delegatedErc191": { + "$ref": "#/definitions/associationsLegacyDelegatedSignature" + } + }, + "title": "A wrapper for all possible signature types" + }, + "message_contentsSignedPublicKey": { + "type": "object", + "properties": { + "keyBytes": { + "type": "string", + "format": "byte", + "title": "embeds an UnsignedPublicKey" + }, + "signature": { + "$ref": "#/definitions/xmtpmessage_contentsSignature", + "title": "signs key_bytes" + } + }, + "title": "SignedPublicKey" + }, + "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" + } + } + } + }, + "v1GetIdentityUpdatesRequestRequest": { + "type": "object", + "properties": { + "inboxId": { + "type": "string" + }, + "sequenceId": { + "type": "string", + "format": "uint64" + } + }, + "description": "Points to the last entry the client has received. The sequence_id should be\nset to 0 if the client has not received anything." + }, + "v1GetIdentityUpdatesResponseResponse": { + "type": "object", + "properties": { + "inboxId": { + "type": "string" + }, + "updates": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/GetIdentityUpdatesResponseIdentityUpdateLog" + } + } + }, + "title": "The update log for a single identity, starting after the last cursor" + }, + "v1GetInboxIdsRequest": { + "type": "object", + "properties": { + "requests": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1GetInboxIdsRequestRequest" + } + } + }, + "title": "Request to retrieve the XIDs for the given addresses" + }, + "v1GetInboxIdsRequestRequest": { + "type": "object", + "properties": { + "address": { + "type": "string" + } + }, + "title": "A single request for a given address" + }, + "v1GetInboxIdsResponse": { + "type": "object", + "properties": { + "responses": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1GetInboxIdsResponseResponse" + } + } + }, + "title": "Response with the XIDs for the requested addresses" + }, + "v1GetInboxIdsResponseResponse": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "inboxId": { + "type": "string" + } + }, + "title": "A single response for a given address" + }, + "v1PublishIdentityUpdateRequest": { + "type": "object", + "properties": { + "identityUpdate": { + "$ref": "#/definitions/associationsIdentityUpdate" + } + }, + "title": "Publishes an identity update to the network" + }, + "v1PublishIdentityUpdateResponse": { + "type": "object", + "title": "The response when an identity update is published" + }, + "xmtpidentityapiv1GetIdentityUpdatesRequest": { + "type": "object", + "properties": { + "requests": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1GetIdentityUpdatesRequestRequest" + } + } + }, + "title": "Get all updates for an identity since the specified time" + }, + "xmtpidentityapiv1GetIdentityUpdatesResponse": { + "type": "object", + "properties": { + "responses": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1GetIdentityUpdatesResponseResponse" + } + } + }, + "title": "Returns all log entries for the requested identities" + }, + "xmtpmessage_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." + } + } +} diff --git a/pkg/proto/openapi/identity/associations/association.swagger.json b/pkg/proto/openapi/identity/associations/association.swagger.json new file mode 100644 index 00000000..ab13e74f --- /dev/null +++ b/pkg/proto/openapi/identity/associations/association.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "identity/associations/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/identity/associations/signature.swagger.json b/pkg/proto/openapi/identity/associations/signature.swagger.json new file mode 100644 index 00000000..36bdbe9a --- /dev/null +++ b/pkg/proto/openapi/identity/associations/signature.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "identity/associations/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/identity/credential.swagger.json b/pkg/proto/openapi/identity/credential.swagger.json new file mode 100644 index 00000000..636e87b8 --- /dev/null +++ b/pkg/proto/openapi/identity/credential.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "identity/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/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/frames.swagger.json b/pkg/proto/openapi/message_contents/frames.swagger.json new file mode 100644 index 00000000..1490c672 --- /dev/null +++ b/pkg/proto/openapi/message_contents/frames.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "message_contents/frames.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..3068282b --- /dev/null +++ b/pkg/proto/openapi/mls/api/v1/mls.swagger.json @@ -0,0 +1,948 @@ +{ + "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/xmtpmlsapiv1GetIdentityUpdatesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/xmtpmlsapiv1GetIdentityUpdatesRequest" + } + } + ], + "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" + }, + "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" + }, + "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": "Serialized MlsProtocolMessage" + }, + "senderHmac": { + "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" + }, + "senderHmac": { + "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" + }, + "isInboxIdCredential": { + "type": "boolean" + } + }, + "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/xmtpmessage_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" + }, + "isInboxIdCredential": { + "type": "boolean" + } + }, + "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" + }, + "hpkePublicKey": { + "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" + }, + "hpkePublicKey": { + "type": "string", + "format": "byte" + } + }, + "title": "Version 1 of the WelcomeMessage format" + }, + "xmtpmessage_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." + }, + "xmtpmlsapiv1GetIdentityUpdatesRequest": { + "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" + }, + "xmtpmlsapiv1GetIdentityUpdatesResponse": { + "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" + } + } +} 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_membership.swagger.json b/pkg/proto/openapi/mls/message_contents/group_membership.swagger.json new file mode 100644 index 00000000..75ce1b1b --- /dev/null +++ b/pkg/proto/openapi/mls/message_contents/group_membership.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "mls/message_contents/group_membership.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/group_mutable_metadata.swagger.json b/pkg/proto/openapi/mls/message_contents/group_mutable_metadata.swagger.json new file mode 100644 index 00000000..572baf72 --- /dev/null +++ b/pkg/proto/openapi/mls/message_contents/group_mutable_metadata.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "mls/message_contents/group_mutable_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/group_permissions.swagger.json b/pkg/proto/openapi/mls/message_contents/group_permissions.swagger.json new file mode 100644 index 00000000..8e8b8d1c --- /dev/null +++ b/pkg/proto/openapi/mls/message_contents/group_permissions.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "mls/message_contents/group_permissions.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..b64068e6 --- /dev/null +++ b/pkg/proto/openapi/mls_validation/v1/service.swagger.json @@ -0,0 +1,559 @@ +{ + "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": { + "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." + }, + "ValidateInboxIdsRequestValidationRequest": { + "type": "object", + "properties": { + "credential": { + "$ref": "#/definitions/xmtpidentityMlsCredential" + }, + "installationPublicKey": { + "type": "string", + "format": "byte" + }, + "identityUpdates": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/associationsIdentityUpdate" + } + } + }, + "title": "a single validation request" + }, + "associationsAddAssociation": { + "type": "object", + "properties": { + "newMemberIdentifier": { + "$ref": "#/definitions/associationsMemberIdentifier" + }, + "existingMemberSignature": { + "$ref": "#/definitions/identityassociationsSignature" + }, + "newMemberSignature": { + "$ref": "#/definitions/identityassociationsSignature" + } + }, + "description": "Adds a new member for an XID - either an addressable member such as a\nwallet, or an installation acting on behalf of an address.\nA key-pair that has been associated with one role MUST not be permitted to be\nassociated with a different role." + }, + "associationsAssociationState": { + "type": "object", + "properties": { + "inboxId": { + "type": "string" + }, + "members": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/associationsMemberMap" + } + }, + "recoveryAddress": { + "type": "string" + }, + "seenSignatures": { + "type": "array", + "items": { + "type": "string", + "format": "byte" + } + } + }, + "title": "A final association state resulting from multiple `IdentityUpdates`" + }, + "associationsAssociationStateDiff": { + "type": "object", + "properties": { + "newMembers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/associationsMemberIdentifier" + } + }, + "removedMembers": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/associationsMemberIdentifier" + } + } + }, + "title": "/ state diff between two final AssociationStates" + }, + "associationsChangeRecoveryAddress": { + "type": "object", + "properties": { + "newRecoveryAddress": { + "type": "string" + }, + "existingRecoveryAddressSignature": { + "$ref": "#/definitions/identityassociationsSignature" + } + }, + "description": "Changes the recovery address for an XID. The recovery address is not required\nto be a member of the XID. In addition to being able to add members, the\nrecovery address can also revoke members." + }, + "associationsCreateInbox": { + "type": "object", + "properties": { + "initialAddress": { + "type": "string" + }, + "nonce": { + "type": "string", + "format": "uint64" + }, + "initialAddressSignature": { + "$ref": "#/definitions/identityassociationsSignature", + "title": "Must be an addressable member" + } + }, + "description": "The first entry of any XID log. The XID must be deterministically derivable\nfrom the address and nonce.\nThe recovery address defaults to the initial associated_address unless\nthere is a subsequent ChangeRecoveryAddress in the log." + }, + "associationsErc1271Signature": { + "type": "object", + "properties": { + "accountId": { + "type": "string", + "title": "CAIP-10\nhttps://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-10.md" + }, + "blockNumber": { + "type": "string", + "format": "uint64", + "title": "Specify the block number to verify the signature against" + }, + "signature": { + "type": "string", + "format": "byte", + "title": "The actual signature bytes" + } + }, + "title": "Smart wallet signature" + }, + "associationsIdentityAction": { + "type": "object", + "properties": { + "createInbox": { + "$ref": "#/definitions/associationsCreateInbox" + }, + "add": { + "$ref": "#/definitions/associationsAddAssociation" + }, + "revoke": { + "$ref": "#/definitions/associationsRevokeAssociation" + }, + "changeRecoveryAddress": { + "$ref": "#/definitions/associationsChangeRecoveryAddress" + } + }, + "title": "A single identity operation" + }, + "associationsIdentityUpdate": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/associationsIdentityAction" + } + }, + "clientTimestampNs": { + "type": "string", + "format": "uint64" + }, + "inboxId": { + "type": "string" + } + }, + "description": "One or more identity actions that were signed together.\nExample: [CreateXid, AddAssociation, ChangeRecoveryAddress]\n1. The batched signature text is created by concatenating the signature text\n of each association together with a separator, '\\n\\n\\n'.\n2. The user signs this concatenated result.\n3. The resulting signature is added to each association proto where relevant.\n The same signature may be used for multiple associations in the array." + }, + "associationsLegacyDelegatedSignature": { + "type": "object", + "properties": { + "delegatedKey": { + "$ref": "#/definitions/message_contentsSignedPublicKey" + }, + "signature": { + "$ref": "#/definitions/identityassociationsRecoverableEcdsaSignature" + } + }, + "description": "An existing address on xmtpv2 may have already signed a legacy identity key\nof type SignedPublicKey via the 'Create Identity' signature.\nFor migration to xmtpv3, the legacy key is permitted to sign on behalf of the\naddress to create a matching xmtpv3 installation key.\nThis signature type can ONLY be used for CreateXid and AddAssociation\npayloads, and can only be used once in xmtpv3." + }, + "associationsMember": { + "type": "object", + "properties": { + "identifier": { + "$ref": "#/definitions/associationsMemberIdentifier" + }, + "addedByEntity": { + "$ref": "#/definitions/associationsMemberIdentifier" + } + }, + "title": "single member that optionally indicates the member that added them" + }, + "associationsMemberIdentifier": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "installationPublicKey": { + "type": "string", + "format": "byte" + } + }, + "title": "The identifier for a member of an XID" + }, + "associationsMemberMap": { + "type": "object", + "properties": { + "key": { + "$ref": "#/definitions/associationsMemberIdentifier" + }, + "value": { + "$ref": "#/definitions/associationsMember" + } + }, + "title": "Map of members belonging to an inbox_id" + }, + "associationsRecoverableEd25519Signature": { + "type": "object", + "properties": { + "bytes": { + "type": "string", + "format": "byte", + "title": "64 bytes [R(32 bytes) || S(32 bytes)]" + }, + "publicKey": { + "type": "string", + "format": "byte", + "title": "32 bytes" + } + }, + "title": "EdDSA signature for 25519" + }, + "associationsRevokeAssociation": { + "type": "object", + "properties": { + "memberToRevoke": { + "$ref": "#/definitions/associationsMemberIdentifier" + }, + "recoveryAddressSignature": { + "$ref": "#/definitions/identityassociationsSignature" + } + }, + "description": "Revokes a member from an XID. The recovery address must sign the revocation." + }, + "identityassociationsRecoverableEcdsaSignature": { + "type": "object", + "properties": { + "bytes": { + "type": "string", + "format": "byte", + "title": "65-bytes [ R || S || V ], with recovery id as the last byte" + } + }, + "title": "RecoverableEcdsaSignature for EIP-191 and V2 signatures" + }, + "identityassociationsSignature": { + "type": "object", + "properties": { + "erc191": { + "$ref": "#/definitions/identityassociationsRecoverableEcdsaSignature" + }, + "erc1271": { + "$ref": "#/definitions/associationsErc1271Signature" + }, + "installationKey": { + "$ref": "#/definitions/associationsRecoverableEd25519Signature" + }, + "delegatedErc191": { + "$ref": "#/definitions/associationsLegacyDelegatedSignature" + } + }, + "title": "A wrapper for all possible signature types" + }, + "message_contentsSignedPublicKey": { + "type": "object", + "properties": { + "keyBytes": { + "type": "string", + "format": "byte", + "title": "embeds an UnsignedPublicKey" + }, + "signature": { + "$ref": "#/definitions/xmtpmessage_contentsSignature", + "title": "signs key_bytes" + } + }, + "title": "SignedPublicKey" + }, + "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" + } + } + } + }, + "v1GetAssociationStateResponse": { + "type": "object", + "properties": { + "associationState": { + "$ref": "#/definitions/associationsAssociationState" + }, + "stateDiff": { + "$ref": "#/definitions/associationsAssociationStateDiff" + } + }, + "title": "Response to GetAssociationStateRequest, containing the final association state\nfor an InboxID" + }, + "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" + }, + "v1ValidateInboxIdKeyPackagesResponse": { + "type": "object", + "properties": { + "responses": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ValidateInboxIdKeyPackagesResponseResponse" + } + } + }, + "title": "Validates a Inbox-ID Key Package Type" + }, + "v1ValidateInboxIdKeyPackagesResponseResponse": { + "type": "object", + "properties": { + "isOk": { + "type": "boolean" + }, + "errorMessage": { + "type": "string" + }, + "credential": { + "$ref": "#/definitions/xmtpidentityMlsCredential" + }, + "installationPublicKey": { + "type": "string", + "format": "byte" + }, + "expiration": { + "type": "string", + "format": "uint64" + } + }, + "title": "one response corresponding to information about one key package" + }, + "v1ValidateInboxIdsResponse": { + "type": "object", + "properties": { + "responses": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ValidateInboxIdsResponseValidationResponse" + }, + "title": "List of validation responses" + } + }, + "title": "Response to ValidateInboxIdRequest" + }, + "v1ValidateInboxIdsResponseValidationResponse": { + "type": "object", + "properties": { + "isOk": { + "type": "boolean" + }, + "errorMessage": { + "type": "string" + }, + "inboxId": { + "type": "string" + } + }, + "title": "a single validation response" + }, + "v1ValidateKeyPackagesRequestKeyPackage": { + "type": "object", + "properties": { + "keyPackageBytesTlsSerialized": { + "type": "string", + "format": "byte" + }, + "isInboxIdCredential": { + "type": "boolean" + } + }, + "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" + }, + "xmtpidentityMlsCredential": { + "type": "object", + "properties": { + "inboxId": { + "type": "string" + } + }, + "title": "A credential that can be used in MLS leaf nodes" + }, + "xmtpmessage_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." + } + } +} diff --git a/pkg/proto/openapi/xmtpv4/message_api/message_api.swagger.json b/pkg/proto/openapi/xmtpv4/message_api/message_api.swagger.json new file mode 100644 index 00000000..660aba85 --- /dev/null +++ b/pkg/proto/openapi/xmtpv4/message_api/message_api.swagger.json @@ -0,0 +1,249 @@ +{ + "swagger": "2.0", + "info": { + "title": "xmtpv4/message_api/message_api.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "ReplicationApi" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/mls/v2/query-envelopes": { + "post": { + "operationId": "ReplicationApi_QueryEnvelopes", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/xmtpv4QueryEnvelopesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/xmtpv4QueryEnvelopesRequest" + } + } + ], + "tags": [ + "ReplicationApi" + ] + } + }, + "/mls/v2/subscribe-envelopes": { + "post": { + "operationId": "ReplicationApi_SubscribeEnvelopes", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/xmtpv4GatewayEnvelope" + }, + "error": { + "$ref": "#/definitions/rpcStatus" + } + }, + "title": "Stream result of xmtpv4GatewayEnvelope" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/xmtpv4BatchSubscribeEnvelopesRequest" + } + } + ], + "tags": [ + "ReplicationApi" + ] + } + } + }, + "definitions": { + "BatchSubscribeEnvelopesRequestSubscribeEnvelopesRequest": { + "type": "object", + "properties": { + "query": { + "$ref": "#/definitions/xmtpv4EnvelopesQuery" + } + } + }, + "identityassociationsRecoverableEcdsaSignature": { + "type": "object", + "properties": { + "bytes": { + "type": "string", + "format": "byte", + "title": "65-bytes [ R || S || V ], with recovery id as the last byte" + } + }, + "title": "RecoverableEcdsaSignature for EIP-191 and V2 signatures" + }, + "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" + } + } + } + }, + "xmtpv4BatchSubscribeEnvelopesRequest": { + "type": "object", + "properties": { + "requests": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/BatchSubscribeEnvelopesRequestSubscribeEnvelopesRequest" + } + } + } + }, + "xmtpv4BlockchainProof": { + "type": "object", + "properties": { + "blockNumber": { + "type": "string", + "format": "uint64" + }, + "publisherId": { + "type": "integer", + "format": "int64" + } + } + }, + "xmtpv4EnvelopesQuery": { + "type": "object", + "properties": { + "originatorSid": { + "type": "string", + "format": "uint64" + }, + "gatewaySid": { + "type": "string", + "format": "uint64" + }, + "topic": { + "type": "string", + "format": "byte" + }, + "originatorId": { + "type": "integer", + "format": "int64" + } + } + }, + "xmtpv4GatewayEnvelope": { + "type": "object", + "properties": { + "gatewaySid": { + "type": "string", + "format": "uint64" + }, + "originatorEnvelope": { + "$ref": "#/definitions/xmtpv4OriginatorEnvelope" + } + } + }, + "xmtpv4OriginatorEnvelope": { + "type": "object", + "properties": { + "unsignedOriginatorEnvelope": { + "type": "string", + "format": "byte", + "title": "Protobuf serialized" + }, + "originatorSignature": { + "$ref": "#/definitions/identityassociationsRecoverableEcdsaSignature" + }, + "blockchainProof": { + "$ref": "#/definitions/xmtpv4BlockchainProof" + } + } + }, + "xmtpv4QueryEnvelopesRequest": { + "type": "object", + "properties": { + "query": { + "$ref": "#/definitions/xmtpv4EnvelopesQuery" + }, + "pagingInfo": { + "$ref": "#/definitions/xmtpxmtpv4PagingInfo" + } + } + }, + "xmtpv4QueryEnvelopesResponse": { + "type": "object", + "properties": { + "envelopes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/xmtpv4GatewayEnvelope" + } + } + } + }, + "xmtpxmtpv4PagingInfo": { + "type": "object", + "properties": { + "limit": { + "type": "integer", + "format": "int64" + } + }, + "title": "Pagination config for queries" + } + } +} diff --git a/pkg/proto/xmtpv4/message_api/message_api.pb.go b/pkg/proto/xmtpv4/message_api/message_api.pb.go new file mode 100644 index 00000000..7fc0c831 --- /dev/null +++ b/pkg/proto/xmtpv4/message_api/message_api.pb.go @@ -0,0 +1,1352 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: xmtpv4/message_api/message_api.proto + +package message_api + +import ( + associations "github.com/xmtp/xmtpd/pkg/proto/identity/associations" + _ "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) +) + +type Misbehavior int32 + +const ( + Misbehavior_MISBEHAVIOR_UNSPECIFIED Misbehavior = 0 + Misbehavior_MISBEHAVIOR_UNAVAILABLE_NODE Misbehavior = 1 + Misbehavior_MISBEHAVIOR_OUT_OF_ORDER_ORIGINATOR_SID Misbehavior = 2 + Misbehavior_MISBEHAVIOR_DUPLICATE_ORIGINATOR_SID Misbehavior = 3 + Misbehavior_MISBEHAVIOR_CYCLICAL_MESSAGE_ORDERING Misbehavior = 4 +) + +// Enum value maps for Misbehavior. +var ( + Misbehavior_name = map[int32]string{ + 0: "MISBEHAVIOR_UNSPECIFIED", + 1: "MISBEHAVIOR_UNAVAILABLE_NODE", + 2: "MISBEHAVIOR_OUT_OF_ORDER_ORIGINATOR_SID", + 3: "MISBEHAVIOR_DUPLICATE_ORIGINATOR_SID", + 4: "MISBEHAVIOR_CYCLICAL_MESSAGE_ORDERING", + } + Misbehavior_value = map[string]int32{ + "MISBEHAVIOR_UNSPECIFIED": 0, + "MISBEHAVIOR_UNAVAILABLE_NODE": 1, + "MISBEHAVIOR_OUT_OF_ORDER_ORIGINATOR_SID": 2, + "MISBEHAVIOR_DUPLICATE_ORIGINATOR_SID": 3, + "MISBEHAVIOR_CYCLICAL_MESSAGE_ORDERING": 4, + } +) + +func (x Misbehavior) Enum() *Misbehavior { + p := new(Misbehavior) + *p = x + return p +} + +func (x Misbehavior) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Misbehavior) Descriptor() protoreflect.EnumDescriptor { + return file_xmtpv4_message_api_message_api_proto_enumTypes[0].Descriptor() +} + +func (Misbehavior) Type() protoreflect.EnumType { + return &file_xmtpv4_message_api_message_api_proto_enumTypes[0] +} + +func (x Misbehavior) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Misbehavior.Descriptor instead. +func (Misbehavior) EnumDescriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{0} +} + +type AuthenticatedData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LastOriginatorSids []uint64 `protobuf:"varint,1,rep,packed,name=last_originator_sids,json=lastOriginatorSids,proto3" json:"last_originator_sids,omitempty"` +} + +func (x *AuthenticatedData) Reset() { + *x = AuthenticatedData{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthenticatedData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthenticatedData) ProtoMessage() {} + +func (x *AuthenticatedData) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_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 AuthenticatedData.ProtoReflect.Descriptor instead. +func (*AuthenticatedData) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{0} +} + +func (x *AuthenticatedData) GetLastOriginatorSids() []uint64 { + if x != nil { + return x.LastOriginatorSids + } + return nil +} + +// Replaces GroupMessageInput V1 +// To rename or not to rename? +type ClientEnvelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // TLS serialized MlsMessageIn, which contains MlsPrivateMessage + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + SenderHmac []byte `protobuf:"bytes,2,opt,name=sender_hmac,json=senderHmac,proto3" json:"sender_hmac,omitempty"` +} + +func (x *ClientEnvelope) Reset() { + *x = ClientEnvelope{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientEnvelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientEnvelope) ProtoMessage() {} + +func (x *ClientEnvelope) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_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 ClientEnvelope.ProtoReflect.Descriptor instead. +func (*ClientEnvelope) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{1} +} + +func (x *ClientEnvelope) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *ClientEnvelope) GetSenderHmac() []byte { + if x != nil { + return x.SenderHmac + } + return nil +} + +type PayerEnvelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UnsignedClientEnvelope []byte `protobuf:"bytes,1,opt,name=unsigned_client_envelope,json=unsignedClientEnvelope,proto3" json:"unsigned_client_envelope,omitempty"` // Protobuf serialized + PayerSignature *associations.RecoverableEcdsaSignature `protobuf:"bytes,2,opt,name=payer_signature,json=payerSignature,proto3" json:"payer_signature,omitempty"` +} + +func (x *PayerEnvelope) Reset() { + *x = PayerEnvelope{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayerEnvelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayerEnvelope) ProtoMessage() {} + +func (x *PayerEnvelope) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_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 PayerEnvelope.ProtoReflect.Descriptor instead. +func (*PayerEnvelope) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{2} +} + +func (x *PayerEnvelope) GetUnsignedClientEnvelope() []byte { + if x != nil { + return x.UnsignedClientEnvelope + } + return nil +} + +func (x *PayerEnvelope) GetPayerSignature() *associations.RecoverableEcdsaSignature { + if x != nil { + return x.PayerSignature + } + return nil +} + +// For blockchain envelopes, the originator_sid is set by the smart contract, +// but the originator_ns is set by the publishing node +type UnsignedOriginatorEnvelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OriginatorSid uint64 `protobuf:"varint,1,opt,name=originator_sid,json=originatorSid,proto3" json:"originator_sid,omitempty"` + OriginatorNs uint64 `protobuf:"varint,2,opt,name=originator_ns,json=originatorNs,proto3" json:"originator_ns,omitempty"` + PayerEnvelope *PayerEnvelope `protobuf:"bytes,3,opt,name=payer_envelope,json=payerEnvelope,proto3" json:"payer_envelope,omitempty"` +} + +func (x *UnsignedOriginatorEnvelope) Reset() { + *x = UnsignedOriginatorEnvelope{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnsignedOriginatorEnvelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsignedOriginatorEnvelope) ProtoMessage() {} + +func (x *UnsignedOriginatorEnvelope) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_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 UnsignedOriginatorEnvelope.ProtoReflect.Descriptor instead. +func (*UnsignedOriginatorEnvelope) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{3} +} + +func (x *UnsignedOriginatorEnvelope) GetOriginatorSid() uint64 { + if x != nil { + return x.OriginatorSid + } + return 0 +} + +func (x *UnsignedOriginatorEnvelope) GetOriginatorNs() uint64 { + if x != nil { + return x.OriginatorNs + } + return 0 +} + +func (x *UnsignedOriginatorEnvelope) GetPayerEnvelope() *PayerEnvelope { + if x != nil { + return x.PayerEnvelope + } + return nil +} + +type BlockchainProof struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + PublisherId uint32 `protobuf:"varint,2,opt,name=publisher_id,json=publisherId,proto3" json:"publisher_id,omitempty"` +} + +func (x *BlockchainProof) Reset() { + *x = BlockchainProof{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockchainProof) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockchainProof) ProtoMessage() {} + +func (x *BlockchainProof) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_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 BlockchainProof.ProtoReflect.Descriptor instead. +func (*BlockchainProof) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{4} +} + +func (x *BlockchainProof) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *BlockchainProof) GetPublisherId() uint32 { + if x != nil { + return x.PublisherId + } + return 0 +} + +type OriginatorEnvelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UnsignedOriginatorEnvelope []byte `protobuf:"bytes,1,opt,name=unsigned_originator_envelope,json=unsignedOriginatorEnvelope,proto3" json:"unsigned_originator_envelope,omitempty"` // Protobuf serialized + // Types that are assignable to Proof: + // + // *OriginatorEnvelope_OriginatorSignature + // *OriginatorEnvelope_BlockchainProof + Proof isOriginatorEnvelope_Proof `protobuf_oneof:"proof"` +} + +func (x *OriginatorEnvelope) Reset() { + *x = OriginatorEnvelope{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OriginatorEnvelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OriginatorEnvelope) ProtoMessage() {} + +func (x *OriginatorEnvelope) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_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 OriginatorEnvelope.ProtoReflect.Descriptor instead. +func (*OriginatorEnvelope) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{5} +} + +func (x *OriginatorEnvelope) GetUnsignedOriginatorEnvelope() []byte { + if x != nil { + return x.UnsignedOriginatorEnvelope + } + return nil +} + +func (m *OriginatorEnvelope) GetProof() isOriginatorEnvelope_Proof { + if m != nil { + return m.Proof + } + return nil +} + +func (x *OriginatorEnvelope) GetOriginatorSignature() *associations.RecoverableEcdsaSignature { + if x, ok := x.GetProof().(*OriginatorEnvelope_OriginatorSignature); ok { + return x.OriginatorSignature + } + return nil +} + +func (x *OriginatorEnvelope) GetBlockchainProof() *BlockchainProof { + if x, ok := x.GetProof().(*OriginatorEnvelope_BlockchainProof); ok { + return x.BlockchainProof + } + return nil +} + +type isOriginatorEnvelope_Proof interface { + isOriginatorEnvelope_Proof() +} + +type OriginatorEnvelope_OriginatorSignature struct { + OriginatorSignature *associations.RecoverableEcdsaSignature `protobuf:"bytes,2,opt,name=originator_signature,json=originatorSignature,proto3,oneof"` +} + +type OriginatorEnvelope_BlockchainProof struct { + BlockchainProof *BlockchainProof `protobuf:"bytes,3,opt,name=blockchain_proof,json=blockchainProof,proto3,oneof"` +} + +func (*OriginatorEnvelope_OriginatorSignature) isOriginatorEnvelope_Proof() {} + +func (*OriginatorEnvelope_BlockchainProof) isOriginatorEnvelope_Proof() {} + +type GatewayEnvelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GatewaySid uint64 `protobuf:"varint,1,opt,name=gateway_sid,json=gatewaySid,proto3" json:"gateway_sid,omitempty"` + OriginatorEnvelope *OriginatorEnvelope `protobuf:"bytes,2,opt,name=originator_envelope,json=originatorEnvelope,proto3" json:"originator_envelope,omitempty"` +} + +func (x *GatewayEnvelope) Reset() { + *x = GatewayEnvelope{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GatewayEnvelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GatewayEnvelope) ProtoMessage() {} + +func (x *GatewayEnvelope) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_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 GatewayEnvelope.ProtoReflect.Descriptor instead. +func (*GatewayEnvelope) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{6} +} + +func (x *GatewayEnvelope) GetGatewaySid() uint64 { + if x != nil { + return x.GatewaySid + } + return 0 +} + +func (x *GatewayEnvelope) GetOriginatorEnvelope() *OriginatorEnvelope { + if x != nil { + return x.OriginatorEnvelope + } + return nil +} + +type EnvelopesQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to LastSeen: + // + // *EnvelopesQuery_OriginatorSid + // *EnvelopesQuery_GatewaySid + LastSeen isEnvelopesQuery_LastSeen `protobuf_oneof:"last_seen"` + // Types that are assignable to Filter: + // + // *EnvelopesQuery_Topic + // *EnvelopesQuery_OriginatorId + Filter isEnvelopesQuery_Filter `protobuf_oneof:"filter"` +} + +func (x *EnvelopesQuery) Reset() { + *x = EnvelopesQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnvelopesQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvelopesQuery) ProtoMessage() {} + +func (x *EnvelopesQuery) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_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 EnvelopesQuery.ProtoReflect.Descriptor instead. +func (*EnvelopesQuery) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{7} +} + +func (m *EnvelopesQuery) GetLastSeen() isEnvelopesQuery_LastSeen { + if m != nil { + return m.LastSeen + } + return nil +} + +func (x *EnvelopesQuery) GetOriginatorSid() uint64 { + if x, ok := x.GetLastSeen().(*EnvelopesQuery_OriginatorSid); ok { + return x.OriginatorSid + } + return 0 +} + +func (x *EnvelopesQuery) GetGatewaySid() uint64 { + if x, ok := x.GetLastSeen().(*EnvelopesQuery_GatewaySid); ok { + return x.GatewaySid + } + return 0 +} + +func (m *EnvelopesQuery) GetFilter() isEnvelopesQuery_Filter { + if m != nil { + return m.Filter + } + return nil +} + +func (x *EnvelopesQuery) GetTopic() []byte { + if x, ok := x.GetFilter().(*EnvelopesQuery_Topic); ok { + return x.Topic + } + return nil +} + +func (x *EnvelopesQuery) GetOriginatorId() uint32 { + if x, ok := x.GetFilter().(*EnvelopesQuery_OriginatorId); ok { + return x.OriginatorId + } + return 0 +} + +type isEnvelopesQuery_LastSeen interface { + isEnvelopesQuery_LastSeen() +} + +type EnvelopesQuery_OriginatorSid struct { + OriginatorSid uint64 `protobuf:"varint,1,opt,name=originator_sid,json=originatorSid,proto3,oneof"` +} + +type EnvelopesQuery_GatewaySid struct { + GatewaySid uint64 `protobuf:"varint,2,opt,name=gateway_sid,json=gatewaySid,proto3,oneof"` +} + +func (*EnvelopesQuery_OriginatorSid) isEnvelopesQuery_LastSeen() {} + +func (*EnvelopesQuery_GatewaySid) isEnvelopesQuery_LastSeen() {} + +type isEnvelopesQuery_Filter interface { + isEnvelopesQuery_Filter() +} + +type EnvelopesQuery_Topic struct { + Topic []byte `protobuf:"bytes,3,opt,name=topic,proto3,oneof"` +} + +type EnvelopesQuery_OriginatorId struct { + OriginatorId uint32 `protobuf:"varint,4,opt,name=originator_id,json=originatorId,proto3,oneof"` +} + +func (*EnvelopesQuery_Topic) isEnvelopesQuery_Filter() {} + +func (*EnvelopesQuery_OriginatorId) isEnvelopesQuery_Filter() {} + +type BatchSubscribeEnvelopesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Requests []*BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *BatchSubscribeEnvelopesRequest) Reset() { + *x = BatchSubscribeEnvelopesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchSubscribeEnvelopesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchSubscribeEnvelopesRequest) ProtoMessage() {} + +func (x *BatchSubscribeEnvelopesRequest) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_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 BatchSubscribeEnvelopesRequest.ProtoReflect.Descriptor instead. +func (*BatchSubscribeEnvelopesRequest) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{8} +} + +func (x *BatchSubscribeEnvelopesRequest) GetRequests() []*BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest { + if x != nil { + return x.Requests + } + return nil +} + +// Pagination config for queries +type PagingInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` +} + +func (x *PagingInfo) Reset() { + *x = PagingInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[9] + 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_xmtpv4_message_api_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 PagingInfo.ProtoReflect.Descriptor instead. +func (*PagingInfo) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{9} +} + +func (x *PagingInfo) GetLimit() uint32 { + if x != nil { + return x.Limit + } + return 0 +} + +type QueryEnvelopesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Query *EnvelopesQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + PagingInfo *PagingInfo `protobuf:"bytes,2,opt,name=paging_info,json=pagingInfo,proto3" json:"paging_info,omitempty"` +} + +func (x *QueryEnvelopesRequest) Reset() { + *x = QueryEnvelopesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryEnvelopesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryEnvelopesRequest) ProtoMessage() {} + +func (x *QueryEnvelopesRequest) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_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 QueryEnvelopesRequest.ProtoReflect.Descriptor instead. +func (*QueryEnvelopesRequest) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{10} +} + +func (x *QueryEnvelopesRequest) GetQuery() *EnvelopesQuery { + if x != nil { + return x.Query + } + return nil +} + +func (x *QueryEnvelopesRequest) GetPagingInfo() *PagingInfo { + if x != nil { + return x.PagingInfo + } + return nil +} + +type QueryEnvelopesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Envelopes []*GatewayEnvelope `protobuf:"bytes,1,rep,name=envelopes,proto3" json:"envelopes,omitempty"` +} + +func (x *QueryEnvelopesResponse) Reset() { + *x = QueryEnvelopesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryEnvelopesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryEnvelopesResponse) ProtoMessage() {} + +func (x *QueryEnvelopesResponse) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_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 QueryEnvelopesResponse.ProtoReflect.Descriptor instead. +func (*QueryEnvelopesResponse) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryEnvelopesResponse) GetEnvelopes() []*GatewayEnvelope { + if x != nil { + return x.Envelopes + } + return nil +} + +type MisbehaviorReport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type Misbehavior `protobuf:"varint,1,opt,name=type,proto3,enum=xmtp.xmtpv4.Misbehavior" json:"type,omitempty"` + Envelopes []*OriginatorEnvelope `protobuf:"bytes,2,rep,name=envelopes,proto3" json:"envelopes,omitempty"` +} + +func (x *MisbehaviorReport) Reset() { + *x = MisbehaviorReport{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MisbehaviorReport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MisbehaviorReport) ProtoMessage() {} + +func (x *MisbehaviorReport) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_message_api_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 MisbehaviorReport.ProtoReflect.Descriptor instead. +func (*MisbehaviorReport) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{12} +} + +func (x *MisbehaviorReport) GetType() Misbehavior { + if x != nil { + return x.Type + } + return Misbehavior_MISBEHAVIOR_UNSPECIFIED +} + +func (x *MisbehaviorReport) GetEnvelopes() []*OriginatorEnvelope { + if x != nil { + return x.Envelopes + } + return nil +} + +type BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Query *EnvelopesQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest) Reset() { + *x = BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_xmtpv4_message_api_message_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest) ProtoMessage() {} + +func (x *BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest) ProtoReflect() protoreflect.Message { + mi := &file_xmtpv4_message_api_message_api_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 BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest.ProtoReflect.Descriptor instead. +func (*BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest) Descriptor() ([]byte, []int) { + return file_xmtpv4_message_api_message_api_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest) GetQuery() *EnvelopesQuery { + if x != nil { + return x.Query + } + return nil +} + +var File_xmtpv4_message_api_message_api_proto protoreflect.FileDescriptor + +var file_xmtpv4_message_api_message_api_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, 0x70, 0x69, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x76, 0x34, 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, 0x25, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2f, 0x61, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x11, 0x41, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x30, 0x0a, + 0x14, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x5f, 0x73, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x12, 0x6c, 0x61, 0x73, + 0x74, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x64, 0x73, 0x22, + 0x45, 0x0a, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, + 0x68, 0x6d, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x48, 0x6d, 0x61, 0x63, 0x22, 0xa9, 0x01, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x65, 0x72, + 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x75, 0x6e, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x75, 0x6e, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x12, 0x5e, 0x0a, 0x0f, 0x70, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x78, 0x6d, + 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x61, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x0e, 0x70, 0x61, 0x79, 0x65, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x1a, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x4f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x4e, 0x73, 0x12, 0x41, 0x0a, + 0x0e, 0x70, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x76, 0x34, 0x2e, 0x50, 0x61, 0x79, 0x65, 0x72, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x52, 0x0d, 0x70, 0x61, 0x79, 0x65, 0x72, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, + 0x22, 0x57, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x50, 0x72, + 0x6f, 0x6f, 0x66, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x72, 0x49, 0x64, 0x22, 0x96, 0x02, 0x0a, 0x12, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, + 0x12, 0x40, 0x0a, 0x1c, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x1a, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x12, 0x6a, 0x0a, 0x14, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x35, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x2e, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x48, 0x00, 0x52, 0x13, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x49, + 0x0a, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, + 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x42, 0x07, 0x0a, 0x05, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x22, 0x84, 0x01, 0x0a, 0x0f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x6e, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x53, 0x69, 0x64, 0x12, 0x50, 0x0a, 0x13, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x76, 0x34, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x76, + 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x52, 0x12, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, + 0x72, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x22, 0xb2, 0x01, 0x0a, 0x0e, 0x45, 0x6e, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0e, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x6f, 0x72, 0x53, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x5f, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x0a, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x01, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, + 0x12, 0x25, 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x73, 0x65, 0x65, 0x6e, 0x42, 0x08, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xd3, + 0x01, 0x0a, 0x1e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x61, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x76, + 0x34, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x73, 0x1a, 0x4e, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x31, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x2e, 0x45, + 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x22, 0x22, 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, 0x22, 0x84, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x2e, + 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x38, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, + 0x54, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x65, 0x6e, 0x76, + 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x52, 0x09, 0x65, 0x6e, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x22, 0x80, 0x01, 0x0a, 0x11, 0x4d, 0x69, 0x73, 0x62, 0x65, 0x68, + 0x61, 0x76, 0x69, 0x6f, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x78, 0x6d, 0x74, 0x70, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x2e, 0x4d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, + 0x69, 0x6f, 0x72, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x65, 0x6e, 0x76, + 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, + 0x6d, 0x74, 0x70, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x52, 0x09, 0x65, + 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x2a, 0xce, 0x01, 0x0a, 0x0b, 0x4d, 0x69, 0x73, + 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x49, 0x53, 0x42, + 0x45, 0x48, 0x41, 0x56, 0x49, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x4d, 0x49, 0x53, 0x42, 0x45, 0x48, 0x41, + 0x56, 0x49, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, + 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x10, 0x01, 0x12, 0x2b, 0x0a, 0x27, 0x4d, 0x49, 0x53, 0x42, 0x45, + 0x48, 0x41, 0x56, 0x49, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x4f, 0x52, + 0x44, 0x45, 0x52, 0x5f, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x53, + 0x49, 0x44, 0x10, 0x02, 0x12, 0x28, 0x0a, 0x24, 0x4d, 0x49, 0x53, 0x42, 0x45, 0x48, 0x41, 0x56, + 0x49, 0x4f, 0x52, 0x5f, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x4f, 0x52, + 0x49, 0x47, 0x49, 0x4e, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x53, 0x49, 0x44, 0x10, 0x03, 0x12, 0x29, + 0x0a, 0x25, 0x4d, 0x49, 0x53, 0x42, 0x45, 0x48, 0x41, 0x56, 0x49, 0x4f, 0x52, 0x5f, 0x43, 0x59, + 0x43, 0x4c, 0x49, 0x43, 0x41, 0x4c, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x4f, + 0x52, 0x44, 0x45, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x32, 0x9b, 0x02, 0x0a, 0x0e, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x69, 0x12, 0x89, 0x01, 0x0a, + 0x12, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x76, + 0x34, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x2e, 0x47, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x22, 0x26, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x6d, 0x6c, 0x73, 0x2f, + 0x76, 0x32, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2d, 0x65, 0x6e, 0x76, + 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x30, 0x01, 0x12, 0x7d, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x78, 0x6d, 0x74, + 0x70, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x6e, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, + 0x2f, 0x6d, 0x6c, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2d, 0x65, 0x6e, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x73, 0x42, 0xa3, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, + 0x78, 0x6d, 0x74, 0x70, 0x2e, 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x42, 0x0f, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x6d, 0x74, 0x70, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x64, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x78, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x61, + 0x70, 0x69, 0xa2, 0x02, 0x03, 0x58, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x58, 0x6d, 0x74, 0x70, 0x2e, + 0x58, 0x6d, 0x74, 0x70, 0x76, 0x34, 0xca, 0x02, 0x0b, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x58, 0x6d, + 0x74, 0x70, 0x76, 0x34, 0xe2, 0x02, 0x17, 0x58, 0x6d, 0x74, 0x70, 0x5c, 0x58, 0x6d, 0x74, 0x70, + 0x76, 0x34, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0c, 0x58, 0x6d, 0x74, 0x70, 0x3a, 0x3a, 0x58, 0x6d, 0x74, 0x70, 0x76, 0x34, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xmtpv4_message_api_message_api_proto_rawDescOnce sync.Once + file_xmtpv4_message_api_message_api_proto_rawDescData = file_xmtpv4_message_api_message_api_proto_rawDesc +) + +func file_xmtpv4_message_api_message_api_proto_rawDescGZIP() []byte { + file_xmtpv4_message_api_message_api_proto_rawDescOnce.Do(func() { + file_xmtpv4_message_api_message_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_xmtpv4_message_api_message_api_proto_rawDescData) + }) + return file_xmtpv4_message_api_message_api_proto_rawDescData +} + +var file_xmtpv4_message_api_message_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_xmtpv4_message_api_message_api_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_xmtpv4_message_api_message_api_proto_goTypes = []any{ + (Misbehavior)(0), // 0: xmtp.xmtpv4.Misbehavior + (*AuthenticatedData)(nil), // 1: xmtp.xmtpv4.AuthenticatedData + (*ClientEnvelope)(nil), // 2: xmtp.xmtpv4.ClientEnvelope + (*PayerEnvelope)(nil), // 3: xmtp.xmtpv4.PayerEnvelope + (*UnsignedOriginatorEnvelope)(nil), // 4: xmtp.xmtpv4.UnsignedOriginatorEnvelope + (*BlockchainProof)(nil), // 5: xmtp.xmtpv4.BlockchainProof + (*OriginatorEnvelope)(nil), // 6: xmtp.xmtpv4.OriginatorEnvelope + (*GatewayEnvelope)(nil), // 7: xmtp.xmtpv4.GatewayEnvelope + (*EnvelopesQuery)(nil), // 8: xmtp.xmtpv4.EnvelopesQuery + (*BatchSubscribeEnvelopesRequest)(nil), // 9: xmtp.xmtpv4.BatchSubscribeEnvelopesRequest + (*PagingInfo)(nil), // 10: xmtp.xmtpv4.PagingInfo + (*QueryEnvelopesRequest)(nil), // 11: xmtp.xmtpv4.QueryEnvelopesRequest + (*QueryEnvelopesResponse)(nil), // 12: xmtp.xmtpv4.QueryEnvelopesResponse + (*MisbehaviorReport)(nil), // 13: xmtp.xmtpv4.MisbehaviorReport + (*BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest)(nil), // 14: xmtp.xmtpv4.BatchSubscribeEnvelopesRequest.SubscribeEnvelopesRequest + (*associations.RecoverableEcdsaSignature)(nil), // 15: xmtp.identity.associations.RecoverableEcdsaSignature +} +var file_xmtpv4_message_api_message_api_proto_depIdxs = []int32{ + 15, // 0: xmtp.xmtpv4.PayerEnvelope.payer_signature:type_name -> xmtp.identity.associations.RecoverableEcdsaSignature + 3, // 1: xmtp.xmtpv4.UnsignedOriginatorEnvelope.payer_envelope:type_name -> xmtp.xmtpv4.PayerEnvelope + 15, // 2: xmtp.xmtpv4.OriginatorEnvelope.originator_signature:type_name -> xmtp.identity.associations.RecoverableEcdsaSignature + 5, // 3: xmtp.xmtpv4.OriginatorEnvelope.blockchain_proof:type_name -> xmtp.xmtpv4.BlockchainProof + 6, // 4: xmtp.xmtpv4.GatewayEnvelope.originator_envelope:type_name -> xmtp.xmtpv4.OriginatorEnvelope + 14, // 5: xmtp.xmtpv4.BatchSubscribeEnvelopesRequest.requests:type_name -> xmtp.xmtpv4.BatchSubscribeEnvelopesRequest.SubscribeEnvelopesRequest + 8, // 6: xmtp.xmtpv4.QueryEnvelopesRequest.query:type_name -> xmtp.xmtpv4.EnvelopesQuery + 10, // 7: xmtp.xmtpv4.QueryEnvelopesRequest.paging_info:type_name -> xmtp.xmtpv4.PagingInfo + 7, // 8: xmtp.xmtpv4.QueryEnvelopesResponse.envelopes:type_name -> xmtp.xmtpv4.GatewayEnvelope + 0, // 9: xmtp.xmtpv4.MisbehaviorReport.type:type_name -> xmtp.xmtpv4.Misbehavior + 6, // 10: xmtp.xmtpv4.MisbehaviorReport.envelopes:type_name -> xmtp.xmtpv4.OriginatorEnvelope + 8, // 11: xmtp.xmtpv4.BatchSubscribeEnvelopesRequest.SubscribeEnvelopesRequest.query:type_name -> xmtp.xmtpv4.EnvelopesQuery + 9, // 12: xmtp.xmtpv4.ReplicationApi.SubscribeEnvelopes:input_type -> xmtp.xmtpv4.BatchSubscribeEnvelopesRequest + 11, // 13: xmtp.xmtpv4.ReplicationApi.QueryEnvelopes:input_type -> xmtp.xmtpv4.QueryEnvelopesRequest + 7, // 14: xmtp.xmtpv4.ReplicationApi.SubscribeEnvelopes:output_type -> xmtp.xmtpv4.GatewayEnvelope + 12, // 15: xmtp.xmtpv4.ReplicationApi.QueryEnvelopes:output_type -> xmtp.xmtpv4.QueryEnvelopesResponse + 14, // [14:16] is the sub-list for method output_type + 12, // [12:14] 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_xmtpv4_message_api_message_api_proto_init() } +func file_xmtpv4_message_api_message_api_proto_init() { + if File_xmtpv4_message_api_message_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xmtpv4_message_api_message_api_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*AuthenticatedData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ClientEnvelope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*PayerEnvelope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*UnsignedOriginatorEnvelope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*BlockchainProof); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*OriginatorEnvelope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*GatewayEnvelope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*EnvelopesQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*BatchSubscribeEnvelopesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*PagingInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*QueryEnvelopesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*QueryEnvelopesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*MisbehaviorReport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*BatchSubscribeEnvelopesRequest_SubscribeEnvelopesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_xmtpv4_message_api_message_api_proto_msgTypes[5].OneofWrappers = []any{ + (*OriginatorEnvelope_OriginatorSignature)(nil), + (*OriginatorEnvelope_BlockchainProof)(nil), + } + file_xmtpv4_message_api_message_api_proto_msgTypes[7].OneofWrappers = []any{ + (*EnvelopesQuery_OriginatorSid)(nil), + (*EnvelopesQuery_GatewaySid)(nil), + (*EnvelopesQuery_Topic)(nil), + (*EnvelopesQuery_OriginatorId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xmtpv4_message_api_message_api_proto_rawDesc, + NumEnums: 1, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_xmtpv4_message_api_message_api_proto_goTypes, + DependencyIndexes: file_xmtpv4_message_api_message_api_proto_depIdxs, + EnumInfos: file_xmtpv4_message_api_message_api_proto_enumTypes, + MessageInfos: file_xmtpv4_message_api_message_api_proto_msgTypes, + }.Build() + File_xmtpv4_message_api_message_api_proto = out.File + file_xmtpv4_message_api_message_api_proto_rawDesc = nil + file_xmtpv4_message_api_message_api_proto_goTypes = nil + file_xmtpv4_message_api_message_api_proto_depIdxs = nil +} diff --git a/pkg/proto/xmtpv4/message_api/message_api.pb.gw.go b/pkg/proto/xmtpv4/message_api/message_api.pb.gw.go new file mode 100644 index 00000000..5f5e0715 --- /dev/null +++ b/pkg/proto/xmtpv4/message_api/message_api.pb.gw.go @@ -0,0 +1,217 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: xmtpv4/message_api/message_api.proto + +/* +Package message_api is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package message_api + +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_ReplicationApi_SubscribeEnvelopes_0(ctx context.Context, marshaler runtime.Marshaler, client ReplicationApiClient, req *http.Request, pathParams map[string]string) (ReplicationApi_SubscribeEnvelopesClient, runtime.ServerMetadata, error) { + var protoReq BatchSubscribeEnvelopesRequest + 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.SubscribeEnvelopes(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_ReplicationApi_QueryEnvelopes_0(ctx context.Context, marshaler runtime.Marshaler, client ReplicationApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryEnvelopesRequest + 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.QueryEnvelopes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ReplicationApi_QueryEnvelopes_0(ctx context.Context, marshaler runtime.Marshaler, server ReplicationApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryEnvelopesRequest + 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.QueryEnvelopes(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterReplicationApiHandlerServer registers the http handlers for service ReplicationApi to "mux". +// UnaryRPC :call ReplicationApiServer 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 RegisterReplicationApiHandlerFromEndpoint instead. +func RegisterReplicationApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ReplicationApiServer) error { + + mux.Handle("POST", pattern_ReplicationApi_SubscribeEnvelopes_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_ReplicationApi_QueryEnvelopes_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.xmtpv4.ReplicationApi/QueryEnvelopes", runtime.WithHTTPPathPattern("/mls/v2/query-envelopes")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ReplicationApi_QueryEnvelopes_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_ReplicationApi_QueryEnvelopes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterReplicationApiHandlerFromEndpoint is same as RegisterReplicationApiHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterReplicationApiHandlerFromEndpoint(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 RegisterReplicationApiHandler(ctx, mux, conn) +} + +// RegisterReplicationApiHandler registers the http handlers for service ReplicationApi to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterReplicationApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterReplicationApiHandlerClient(ctx, mux, NewReplicationApiClient(conn)) +} + +// RegisterReplicationApiHandlerClient registers the http handlers for service ReplicationApi +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ReplicationApiClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ReplicationApiClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ReplicationApiClient" to call the correct interceptors. +func RegisterReplicationApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ReplicationApiClient) error { + + mux.Handle("POST", pattern_ReplicationApi_SubscribeEnvelopes_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.xmtpv4.ReplicationApi/SubscribeEnvelopes", runtime.WithHTTPPathPattern("/mls/v2/subscribe-envelopes")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ReplicationApi_SubscribeEnvelopes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ReplicationApi_SubscribeEnvelopes_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_ReplicationApi_QueryEnvelopes_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.xmtpv4.ReplicationApi/QueryEnvelopes", runtime.WithHTTPPathPattern("/mls/v2/query-envelopes")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ReplicationApi_QueryEnvelopes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ReplicationApi_QueryEnvelopes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_ReplicationApi_SubscribeEnvelopes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v2", "subscribe-envelopes"}, "")) + + pattern_ReplicationApi_QueryEnvelopes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"mls", "v2", "query-envelopes"}, "")) +) + +var ( + forward_ReplicationApi_SubscribeEnvelopes_0 = runtime.ForwardResponseStream + + forward_ReplicationApi_QueryEnvelopes_0 = runtime.ForwardResponseMessage +) diff --git a/pkg/proto/xmtpv4/message_api/message_api_grpc.pb.go b/pkg/proto/xmtpv4/message_api/message_api_grpc.pb.go new file mode 100644 index 00000000..f9105dde --- /dev/null +++ b/pkg/proto/xmtpv4/message_api/message_api_grpc.pb.go @@ -0,0 +1,174 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: xmtpv4/message_api/message_api.proto + +package message_api + +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 ( + ReplicationApi_SubscribeEnvelopes_FullMethodName = "/xmtp.xmtpv4.ReplicationApi/SubscribeEnvelopes" + ReplicationApi_QueryEnvelopes_FullMethodName = "/xmtp.xmtpv4.ReplicationApi/QueryEnvelopes" +) + +// ReplicationApiClient is the client API for ReplicationApi 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 ReplicationApiClient interface { + SubscribeEnvelopes(ctx context.Context, in *BatchSubscribeEnvelopesRequest, opts ...grpc.CallOption) (ReplicationApi_SubscribeEnvelopesClient, error) + QueryEnvelopes(ctx context.Context, in *QueryEnvelopesRequest, opts ...grpc.CallOption) (*QueryEnvelopesResponse, error) +} + +type replicationApiClient struct { + cc grpc.ClientConnInterface +} + +func NewReplicationApiClient(cc grpc.ClientConnInterface) ReplicationApiClient { + return &replicationApiClient{cc} +} + +func (c *replicationApiClient) SubscribeEnvelopes(ctx context.Context, in *BatchSubscribeEnvelopesRequest, opts ...grpc.CallOption) (ReplicationApi_SubscribeEnvelopesClient, error) { + stream, err := c.cc.NewStream(ctx, &ReplicationApi_ServiceDesc.Streams[0], ReplicationApi_SubscribeEnvelopes_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &replicationApiSubscribeEnvelopesClient{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 ReplicationApi_SubscribeEnvelopesClient interface { + Recv() (*GatewayEnvelope, error) + grpc.ClientStream +} + +type replicationApiSubscribeEnvelopesClient struct { + grpc.ClientStream +} + +func (x *replicationApiSubscribeEnvelopesClient) Recv() (*GatewayEnvelope, error) { + m := new(GatewayEnvelope) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *replicationApiClient) QueryEnvelopes(ctx context.Context, in *QueryEnvelopesRequest, opts ...grpc.CallOption) (*QueryEnvelopesResponse, error) { + out := new(QueryEnvelopesResponse) + err := c.cc.Invoke(ctx, ReplicationApi_QueryEnvelopes_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ReplicationApiServer is the server API for ReplicationApi service. +// All implementations must embed UnimplementedReplicationApiServer +// for forward compatibility +type ReplicationApiServer interface { + SubscribeEnvelopes(*BatchSubscribeEnvelopesRequest, ReplicationApi_SubscribeEnvelopesServer) error + QueryEnvelopes(context.Context, *QueryEnvelopesRequest) (*QueryEnvelopesResponse, error) + mustEmbedUnimplementedReplicationApiServer() +} + +// UnimplementedReplicationApiServer must be embedded to have forward compatible implementations. +type UnimplementedReplicationApiServer struct { +} + +func (UnimplementedReplicationApiServer) SubscribeEnvelopes(*BatchSubscribeEnvelopesRequest, ReplicationApi_SubscribeEnvelopesServer) error { + return status.Errorf(codes.Unimplemented, "method SubscribeEnvelopes not implemented") +} +func (UnimplementedReplicationApiServer) QueryEnvelopes(context.Context, *QueryEnvelopesRequest) (*QueryEnvelopesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryEnvelopes not implemented") +} +func (UnimplementedReplicationApiServer) mustEmbedUnimplementedReplicationApiServer() {} + +// UnsafeReplicationApiServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ReplicationApiServer will +// result in compilation errors. +type UnsafeReplicationApiServer interface { + mustEmbedUnimplementedReplicationApiServer() +} + +func RegisterReplicationApiServer(s grpc.ServiceRegistrar, srv ReplicationApiServer) { + s.RegisterService(&ReplicationApi_ServiceDesc, srv) +} + +func _ReplicationApi_SubscribeEnvelopes_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(BatchSubscribeEnvelopesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ReplicationApiServer).SubscribeEnvelopes(m, &replicationApiSubscribeEnvelopesServer{stream}) +} + +type ReplicationApi_SubscribeEnvelopesServer interface { + Send(*GatewayEnvelope) error + grpc.ServerStream +} + +type replicationApiSubscribeEnvelopesServer struct { + grpc.ServerStream +} + +func (x *replicationApiSubscribeEnvelopesServer) Send(m *GatewayEnvelope) error { + return x.ServerStream.SendMsg(m) +} + +func _ReplicationApi_QueryEnvelopes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEnvelopesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReplicationApiServer).QueryEnvelopes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ReplicationApi_QueryEnvelopes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReplicationApiServer).QueryEnvelopes(ctx, req.(*QueryEnvelopesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ReplicationApi_ServiceDesc is the grpc.ServiceDesc for ReplicationApi service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ReplicationApi_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "xmtp.xmtpv4.ReplicationApi", + HandlerType: (*ReplicationApiServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QueryEnvelopes", + Handler: _ReplicationApi_QueryEnvelopes_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "SubscribeEnvelopes", + Handler: _ReplicationApi_SubscribeEnvelopes_Handler, + ServerStreams: true, + }, + }, + Metadata: "xmtpv4/message_api/message_api.proto", +} diff --git a/pkg/registry/registry.go b/pkg/registry/registry.go new file mode 100644 index 00000000..56a33cbc --- /dev/null +++ b/pkg/registry/registry.go @@ -0,0 +1,32 @@ +package registry + +type Node struct { + Index int + PublicKey []byte + GrpcAddress string + DisabledBlock *uint64 + // Maybe add mTLS cert here +} + +type NodeRegistry interface { + GetNodes() ([]Node, error) + // OnChange() +} + +// TODO: Delete this or move to a test file + +type FixedNodeRegistry struct { + nodes []Node +} + +func NewFixedNodeRegistry(nodes []Node) *FixedNodeRegistry { + return &FixedNodeRegistry{nodes: nodes} +} + +func (r *FixedNodeRegistry) GetNodes() ([]Node, error) { + return r.nodes, nil +} + +func (f *FixedNodeRegistry) AddNode(node Node) { + f.nodes = append(f.nodes, node) +} diff --git a/pkg/server/options.go b/pkg/server/options.go new file mode 100644 index 00000000..3fce6023 --- /dev/null +++ b/pkg/server/options.go @@ -0,0 +1,27 @@ +package server + +import "time" + +type ApiOptions struct { + Port int `short:"p" long:"port" description:"Port to listen on" default:"5050"` +} + +type DbOptions struct { + ReaderConnectionString string `long:"reader-connection-string" description:"Reader connection string"` + WriterConnectionString string `long:"writer-connection-string" description:"Writer connection string" required:"true"` + ReadTimeout time.Duration `long:"read-timeout" description:"Timeout for reading from the database" default:"10s"` + WriteTimeout time.Duration `long:"write-timeout" description:"Timeout for writing to the database" default:"10s"` + MaxOpenConns int `long:"max-open-conns" description:"Maximum number of open connections" default:"80"` + WaitForDB time.Duration `long:"wait-for" description:"wait for DB on start, up to specified duration"` +} + +type Options struct { + LogLevel string `short:"l" long:"log-level" description:"Define the logging level, supported strings are: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL, and their lower-case forms." default:"INFO"` + //nolint:staticcheck + LogEncoding string `long:"log-encoding" description:"Log encoding format. Either console or json" choice:"console" choice:"json" default:"console"` + + PrivateKeyString string `long:"private-key" description:"Private key to use for the node"` + + API ApiOptions `group:"API Options" namespace:"api"` + DB DbOptions `group:"Database Options" namespace:"db"` +} diff --git a/pkg/server/server.go b/pkg/server/server.go new file mode 100644 index 00000000..0e682557 --- /dev/null +++ b/pkg/server/server.go @@ -0,0 +1,76 @@ +package server + +import ( + "context" + "crypto/ecdsa" + "database/sql" + "net" + "os" + "os/signal" + "syscall" + + "github.com/ethereum/go-ethereum/crypto" + "github.com/xmtp/xmtpd/pkg/api" + "github.com/xmtp/xmtpd/pkg/registry" + "go.uber.org/zap" +) + +type Server struct { + options Options + log *zap.Logger + ctx context.Context + cancel context.CancelFunc + apiServer *api.ApiServer + nodeRegistry registry.NodeRegistry + privateKey *ecdsa.PrivateKey + writerDb *sql.DB + // Can add reader DB later if needed +} + +func New(ctx context.Context, log *zap.Logger, options Options, nodeRegistry registry.NodeRegistry) (*Server, error) { + var err error + s := &Server{ + options: options, + log: log, + nodeRegistry: nodeRegistry, + } + s.privateKey, err = parsePrivateKey(options.PrivateKeyString) + if err != nil { + return nil, err + } + // Commenting out the DB stuff until I get the new migrations in + // s.writerDb, err = getWriterDb(options.DB) + // if err != nil { + // return nil, err + // } + + s.ctx, s.cancel = context.WithCancel(ctx) + s.apiServer, err = api.NewAPIServer(ctx, log, options.API.Port) + if err != nil { + return nil, err + } + log.Info("Replication server started", zap.Int("port", options.API.Port)) + return s, nil +} + +func (s *Server) Addr() net.Addr { + return s.apiServer.Addr() +} + +func (s *Server) WaitForShutdown() { + termChannel := make(chan os.Signal, 1) + signal.Notify(termChannel, syscall.SIGINT, syscall.SIGTERM) + <-termChannel + s.Shutdown() +} + +func (s *Server) Shutdown() { + s.cancel() + if s.apiServer != nil { + s.apiServer.Close() + } +} + +func parsePrivateKey(privateKeyString string) (*ecdsa.PrivateKey, error) { + return crypto.HexToECDSA(privateKeyString) +} diff --git a/pkg/server/server_test.go b/pkg/server/server_test.go new file mode 100644 index 00000000..a47a80c0 --- /dev/null +++ b/pkg/server/server_test.go @@ -0,0 +1,45 @@ +package server + +import ( + "context" + "encoding/hex" + "testing" + "time" + + "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/require" + "github.com/xmtp/xmtpd/pkg/registry" + test "github.com/xmtp/xmtpd/pkg/testing" +) + +const WRITER_DB_CONNECTION_STRING = "postgres://postgres:xmtp@localhost:8765/postgres?sslmode=disable" + +func NewTestServer(t *testing.T, registry registry.NodeRegistry) *Server { + log := test.NewLog(t) + privateKey, err := crypto.GenerateKey() + require.NoError(t, err) + + server, err := New(context.Background(), log, Options{ + PrivateKeyString: hex.EncodeToString(crypto.FromECDSA(privateKey)), + API: ApiOptions{ + Port: 0, + }, + DB: DbOptions{ + WriterConnectionString: WRITER_DB_CONNECTION_STRING, + ReadTimeout: time.Second * 10, + WriteTimeout: time.Second * 10, + MaxOpenConns: 10, + WaitForDB: time.Second * 10, + }, + }, registry) + require.NoError(t, err) + + return server +} + +func TestCreateServer(t *testing.T) { + registry := registry.NewFixedNodeRegistry([]registry.Node{}) + server1 := NewTestServer(t, registry) + server2 := NewTestServer(t, registry) + require.NotEqual(t, server1.Addr(), server2.Addr()) +} diff --git a/pkg/testing/log.go b/pkg/testing/log.go new file mode 100644 index 00000000..cbfd3fd0 --- /dev/null +++ b/pkg/testing/log.go @@ -0,0 +1,25 @@ +package testing + +import ( + "flag" + "testing" + + "github.com/stretchr/testify/require" + "go.uber.org/zap" +) + +var debug bool + +func init() { + flag.BoolVar(&debug, "debug", false, "debug level logging in tests") +} + +func NewLog(t testing.TB) *zap.Logger { + cfg := zap.NewDevelopmentConfig() + if !debug { + cfg.Level = zap.NewAtomicLevelAt(zap.InfoLevel) + } + log, err := cfg.Build() + require.NoError(t, err) + return log +} diff --git a/pkg/testing/random.go b/pkg/testing/random.go new file mode 100644 index 00000000..5d20b68e --- /dev/null +++ b/pkg/testing/random.go @@ -0,0 +1,35 @@ +package testing + +import ( + cryptoRand "crypto/rand" + "math/rand" + "strings" + + "github.com/xmtp/xmtpd/pkg/utils" +) + +var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") + +func RandomString(n int) string { + b := make([]rune, n) + for i := range b { + b[i] = letterRunes[rand.Intn(len(letterRunes))] + } + return string(b) +} + +func RandomStringLower(n int) string { + return strings.ToLower(RandomString(n)) +} + +func RandomBytes(n int) []byte { + b := make([]byte, n) + _, _ = cryptoRand.Read(b) + return b +} + +func RandomInboxId() string { + bytes := RandomBytes(32) + + return utils.HexEncode(bytes) +} diff --git a/pkg/tracing/tracing.go b/pkg/tracing/tracing.go new file mode 100644 index 00000000..78d5ca3a --- /dev/null +++ b/pkg/tracing/tracing.go @@ -0,0 +1,113 @@ +// Package tracing enables [Datadog APM tracing](https://docs.datadoghq.com/tracing/) capabilities, +// focusing specifically on [Error Tracking](https://docs.datadoghq.com/tracing/error_tracking/) +package tracing + +import ( + "context" + "os" + "sync" + + "go.uber.org/zap" + "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext" + "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer" +) + +// reimport relevant bits of the tracer API +var ( + StartSpanFromContext = tracer.StartSpanFromContext + StartSpan = tracer.StartSpan + ChildOf = tracer.ChildOf + WithError = tracer.WithError + ContextWithSpan = tracer.ContextWithSpan +) + +type Span = tracer.Span + +type logger struct{ *zap.Logger } + +func (l logger) Log(msg string) { + l.Error(msg) +} + +// Start boots the datadog tracer, run this once early in the startup sequence. +func Start(version string, l *zap.Logger) { + env := os.Getenv("ENV") + if env == "" { + env = "test" + } + tracer.Start( + tracer.WithEnv(env), + tracer.WithService("xmtpd"), + tracer.WithServiceVersion(version), + tracer.WithLogger(logger{l}), + tracer.WithRuntimeMetrics(), + ) +} + +// Stop shuts down the datadog tracer, defer this right after Start(). +func Stop() { + tracer.Stop() +} + +// Wrap executes action in the context of a span. +// Tags the span with the error if action returns one. +func Wrap(ctx context.Context, log *zap.Logger, operation string, action func(context.Context, *zap.Logger, Span) error) error { + span, ctx := tracer.StartSpanFromContext(ctx, operation) + defer span.Finish() + log = Link(span, log.With(zap.String("span", operation))) + err := action(ctx, log, span) + if err != nil { + span.Finish(WithError(err)) + } + return err +} + +// PanicWrap executes the body guarding for panics. +// If panic happens it emits a span with the error attached. +// This should trigger DD APM's Error Tracking to record the error. +func PanicWrap(ctx context.Context, name string, body func(context.Context)) { + defer func() { + r := recover() + if err, ok := r.(error); ok { + StartSpan("panic: " + name).Finish( + WithError(err), + ) + } + if r != nil { + // Repanic so that we don't suppress normal panic behavior. + panic(r) + } + }() + body(ctx) +} + +// Link connects a logger to a particular trace and span. +// DD APM should provide some additional functionality based on that. +func Link(span tracer.Span, l *zap.Logger) *zap.Logger { + return l.With( + zap.Uint64("dd.trace_id", span.Context().TraceID()), + zap.Uint64("dd.span_id", span.Context().SpanID())) +} + +func SpanType(span Span, typ string) { + span.SetTag(ext.SpanType, typ) +} + +func SpanResource(span Span, resource string) { + span.SetTag(ext.ResourceName, resource) +} + +func SpanTag(span Span, key string, value interface{}) { + span.SetTag(key, value) +} + +// GoPanicWrap extends PanicWrap by running the body in a goroutine and +// synchronizing the goroutine exit with the WaitGroup. +// The body must respect cancellation of the Context. +func GoPanicWrap(ctx context.Context, wg *sync.WaitGroup, name string, body func(context.Context)) { + wg.Add(1) + go func() { + defer wg.Done() + PanicWrap(ctx, name, body) + }() +} diff --git a/pkg/tracing/tracing_test.go b/pkg/tracing/tracing_test.go new file mode 100644 index 00000000..60aa8939 --- /dev/null +++ b/pkg/tracing/tracing_test.go @@ -0,0 +1,40 @@ +package tracing + +import ( + "context" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func Test_GoPanicWrap_WaitGroup(t *testing.T) { + var wg sync.WaitGroup + ctx, cancel := context.WithCancel(context.Background()) + finished := false + var finishedLock sync.RWMutex + GoPanicWrap(ctx, &wg, "test", func(ctx context.Context) { + <-ctx.Done() + finishedLock.Lock() + defer finishedLock.Unlock() + finished = true + }) + done := false + var doneLock sync.RWMutex + go func() { + wg.Wait() + doneLock.Lock() + defer doneLock.Unlock() + done = true + }() + go func() { time.Sleep(time.Millisecond); cancel() }() + + assert.Eventually(t, func() bool { + finishedLock.RLock() + defer finishedLock.RUnlock() + doneLock.RLock() + defer doneLock.RUnlock() + return finished && done + }, time.Second, 10*time.Millisecond) +} diff --git a/pkg/utils/hex.go b/pkg/utils/hex.go new file mode 100644 index 00000000..02fc8f47 --- /dev/null +++ b/pkg/utils/hex.go @@ -0,0 +1,19 @@ +package utils + +import "encoding/hex" + +func HexEncode(data []byte) string { + return hex.EncodeToString(data) +} + +func HexDecode(s string) ([]byte, error) { + return hex.DecodeString(s) +} + +func AssertHexDecode(s string) []byte { + data, err := HexDecode(s) + if err != nil { + panic(err) + } + return data +} diff --git a/pkg/utils/sleep.go b/pkg/utils/sleep.go new file mode 100644 index 00000000..c4120540 --- /dev/null +++ b/pkg/utils/sleep.go @@ -0,0 +1,10 @@ +package utils + +import ( + "math/rand" + "time" +) + +func RandomSleep(maxTimeMs int) { + time.Sleep(time.Millisecond * time.Duration(rand.Intn(maxTimeMs))) +}