diff --git a/packages/network/package.json b/packages/network/package.json index 68b93cd941..bb47ff4b55 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -46,7 +46,8 @@ "ts-node": "^10.7.0", "tslib": "^2.3.1", "typedoc": "^0.23.10", - "typescript": "^4.6.2" + "typescript": "^4.6.2", + "threads": "^1.7.0" }, "peerDependencies": { "@ethersproject/providers": "^5.6.1", @@ -59,7 +60,9 @@ "ethers": "^5.7.1", "mobx": "^6.5.0", "observable-webworker": "^4.0.1", - "rxjs": "^7.5.5" + "rxjs": "^7.5.5", + "threads": "^1.7.0" }, - "gitHead": "218f56893d268b0c5157a3e4c603b859e287a343" + "gitHead": "218f56893d268b0c5157a3e4c603b859e287a343", + "dependencies": {} } diff --git a/packages/network/src/createRelayerStream.ts b/packages/network/src/createRelayerStream.ts index 14eec86f1e..02bb055417 100644 --- a/packages/network/src/createRelayerStream.ts +++ b/packages/network/src/createRelayerStream.ts @@ -1,6 +1,11 @@ +import { Message } from "@latticexyz/services/protobuf/ts/ecs-relay/ecs-relay"; import { ECSRelayServiceClient } from "@latticexyz/services/protobuf/ts/ecs-relay/ecs-relay.client"; +import { awaitPromise } from "@latticexyz/utils"; import { GrpcWebFetchTransport } from "@protobuf-ts/grpcweb-transport"; -import { from } from "rxjs"; +import { Signer } from "ethers"; +import { from, map } from "rxjs"; +import { spawn } from "threads"; +import { messagePayload } from "./utils"; /** * Create a ECSRelayServiceClient @@ -18,37 +23,53 @@ export function createRelayerClient(url: string): ECSRelayServiceClient { * @param id User id (eg address) * @returns RelayService connection */ -export async function createRelayerStream(url: string, id: string) { +export async function createRelayerStream(signer: Signer, url: string, id: string) { const relayerClient = createRelayerClient(url); - const identity = { name: id }; - await relayerClient.authenticate(identity); + const recoverWorker = await spawn( + new Worker(new URL("./workers/Recover.worker.ts", import.meta.url), { type: "module" }) + ); + + // Signature that should be used to prove identity + const signature = { + signature: await signer.signMessage("ecs-relay-service"), + }; + + await relayerClient.authenticate(signature); // Subscribe to the stream of relayed events - const stream = relayerClient.openStream(identity); - const event$ = from(stream.responses); + const stream = relayerClient.openStream(signature); + const event$ = from(stream.responses).pipe( + map(async (message) => ({ + message, + address: await recoverWorker.recoverAddress(message), + })), + awaitPromise() + ); // Ping every 15s to stay alive - const keepAlive = setInterval(() => relayerClient.ping(identity), 15000); + const keepAlive = setInterval(() => relayerClient.ping(signature), 15000); function dispose() { clearInterval(keepAlive); } // Subscribe to new labels function subscribe(label: string) { - relayerClient.subscribe({ identity, subscription: { label } }); + relayerClient.subscribe({ signature, subscription: { label } }); } // Unsubscribe from labels function unsubscribe(label: string) { - relayerClient.unsubscribe({ identity, subscription: { label } }); + relayerClient.unsubscribe({ signature, subscription: { label } }); } // Push data to subscribers - function push(label: string, data: Uint8Array) { + async function push(label: string, data: Uint8Array) { + const message: Message = { version: 1, id: Date.now() + id, timestamp: BigInt(Date.now()), data, signature: "" }; + message.signature = await signer.signMessage(messagePayload(message)); + relayerClient.push({ - identity, label, - messages: [{ version: 1, data, timestamp: BigInt(Date.now()), id: id + Date.now() }], + message, }); } diff --git a/packages/network/src/utils.ts b/packages/network/src/utils.ts new file mode 100644 index 0000000000..519dbb1e58 --- /dev/null +++ b/packages/network/src/utils.ts @@ -0,0 +1,7 @@ +import { Message } from "@latticexyz/services/protobuf/ts/ecs-relay/ecs-relay"; +import { keccak256 } from "ethers/lib/utils"; + +// Message payload to sign and use to recover signer +export function messagePayload(msg: Message) { + return `(${msg.version},${msg.id},${keccak256(msg.data)},${msg.timestamp})`; +} diff --git a/packages/network/src/workers/Recover.worker.ts b/packages/network/src/workers/Recover.worker.ts new file mode 100644 index 0000000000..520693a0b0 --- /dev/null +++ b/packages/network/src/workers/Recover.worker.ts @@ -0,0 +1,10 @@ +import { Message } from "@latticexyz/services/protobuf/ts/ecs-relay/ecs-relay"; +import { expose } from "threads"; +import { verifyMessage } from "ethers/lib/utils"; +import { messagePayload } from "../utils"; + +function recoverAddress(msg: Message) { + return verifyMessage(messagePayload(msg), msg.signature); +} + +expose({ recoverAddress }); diff --git a/packages/services/.gitignore b/packages/services/.gitignore index c153a578d3..384c2cc010 100644 --- a/packages/services/.gitignore +++ b/packages/services/.gitignore @@ -1,4 +1,5 @@ i.DS_Store /bin /snapshots -docs \ No newline at end of file +docs +FaucetStore \ No newline at end of file diff --git a/packages/services/cmd/ecs-relay/main.go b/packages/services/cmd/ecs-relay/main.go index 6d569a4b01..ae74e2ae29 100644 --- a/packages/services/cmd/ecs-relay/main.go +++ b/packages/services/cmd/ecs-relay/main.go @@ -12,6 +12,7 @@ var ( port = flag.Int("port", 50071, "gRPC Server Port") idleTimeoutTime = flag.Int("idle-timeout-time", 30, "Time in seconds after which a client connection times out. Defaults to 30s") idleDisconnectIterval = flag.Int("idle-disconnect-interval", 60, "Time in seconds for how oftern to disconnect idle clients. Defaults to 60s") + messsageDriftTime = flag.Int("message-drift-time", 5, "Time in seconds that is acceptable as drift before message is not relayed. Defaults to 5s") ) func main() { @@ -27,6 +28,7 @@ func main() { config := &relay.RelayServerConfig{ IdleTimeoutTime: *idleTimeoutTime, IdleDisconnectIterval: *idleDisconnectIterval, + MessageDriftTime: *messsageDriftTime, } // Start gRPC server and the relayer. diff --git a/packages/services/pkg/faucet/core.go b/packages/services/pkg/faucet/core.go index 871e4fe3cc..eb48c71850 100644 --- a/packages/services/pkg/faucet/core.go +++ b/packages/services/pkg/faucet/core.go @@ -4,14 +4,12 @@ import ( "fmt" "io/ioutil" "latticexyz/mud/packages/services/pkg/logger" + "latticexyz/mud/packages/services/pkg/utils" "os" "strings" "time" "github.com/dghubble/go-twitter/twitter" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" "go.uber.org/zap" "google.golang.org/protobuf/proto" @@ -28,24 +26,6 @@ func TwitterUsernameQuery(username string) string { return fmt.Sprintf("from:%s AND %s", username, MatchingHashtag) } -func VerifySig(from, sigHex string, msg []byte) (bool, string) { - sig := hexutil.MustDecode(sigHex) - - msg = accounts.TextHash(msg) - if sig[crypto.RecoveryIDOffset] == 27 || sig[crypto.RecoveryIDOffset] == 28 { - sig[crypto.RecoveryIDOffset] -= 27 // Transform yellow paper V from 27/28 to 0/1 - } - - recovered, err := crypto.SigToPub(msg, sig) - if err != nil { - return false, "" - } - - recoveredAddr := crypto.PubkeyToAddress(*recovered) - - return from == recoveredAddr.Hex(), recoveredAddr.Hex() -} - func ExtractSignatureFromTweet(tweet twitter.Tweet) string { tokens := strings.Split(tweet.FullText, "faucet") return strings.TrimSpace(tokens[1])[:132] @@ -54,11 +34,14 @@ func ExtractSignatureFromTweet(tweet twitter.Tweet) string { func VerifyDripRequestTweet(tweet twitter.Tweet, username string, address string) error { tweetSignature := ExtractSignatureFromTweet(tweet) - isVerified, recoveredAddress := VerifySig( + isVerified, recoveredAddress, err := utils.VerifySig( address, tweetSignature, []byte(fmt.Sprintf("%s tweetooor requesting drip to %s address", username, address)), ) + if err != nil { + return fmt.Errorf("error verifying signature: %s", err.Error()) + } if !isVerified { return fmt.Errorf("recovered address %s != provided address %s", recoveredAddress, address) } diff --git a/packages/services/pkg/grpc/relay.go b/packages/services/pkg/grpc/relay.go index abec88a987..199b549f35 100644 --- a/packages/services/pkg/grpc/relay.go +++ b/packages/services/pkg/grpc/relay.go @@ -4,9 +4,11 @@ import ( "context" "fmt" "latticexyz/mud/packages/services/pkg/relay" + "latticexyz/mud/packages/services/pkg/utils" pb "latticexyz/mud/packages/services/protobuf/go/ecs-relay" "time" + "github.com/ethereum/go-ethereum/crypto" "go.uber.org/zap" ) @@ -60,16 +62,16 @@ func (server *ecsRelayServer) Stop() { server.ClientRegistry.DisconnectAll() } -func (server *ecsRelayServer) Authenticate(ctx context.Context, identity *pb.Identity) (*pb.Identity, error) { - if len(identity.Name) == 0 { - name, err := relay.GenerateRandomIdentifier() - if err != nil { - return nil, err - } else { - identity.Name = name - } +func (server *ecsRelayServer) Authenticate(ctx context.Context, signature *pb.Signature) (*pb.Identity, error) { + if len(signature.Signature) == 0 { + return nil, fmt.Errorf("signature required to authenticate") } - server.logger.Info("authenticating client", zap.String("name", identity.Name)) + + identity, err := relay.RecoverIdentity(signature) + if err != nil { + return nil, err + } + server.logger.Info("successfully authenticated client", zap.String("name", identity.Name)) if !server.IsRegistered(identity) { server.Register(identity) @@ -81,11 +83,16 @@ func (server *ecsRelayServer) Authenticate(ctx context.Context, identity *pb.Ide return identity, nil } -func (server *ecsRelayServer) Revoke(ctx context.Context, identity *pb.Identity) (*pb.Identity, error) { - if len(identity.Name) == 0 { - return nil, fmt.Errorf("required to provide an identity when revoking") +func (server *ecsRelayServer) Revoke(ctx context.Context, signature *pb.Signature) (*pb.Identity, error) { + if len(signature.Signature) == 0 { + return nil, fmt.Errorf("signature required to revoke") + } + + identity, err := relay.RecoverIdentity(signature) + if err != nil { + return nil, err } - server.logger.Info("authenticating client", zap.String("name", identity.Name)) + server.logger.Info("successfully authenticated client", zap.String("name", identity.Name)) if server.IsRegistered(identity) { err := server.Unregister(identity) @@ -100,10 +107,14 @@ func (server *ecsRelayServer) Revoke(ctx context.Context, identity *pb.Identity) return identity, nil } -func (server *ecsRelayServer) Ping(ctx context.Context, identity *pb.Identity) (*pb.Identity, error) { - client, err := server.GetClient(identity) +func (server *ecsRelayServer) Ping(ctx context.Context, signature *pb.Signature) (*pb.Identity, error) { + if len(signature.Signature) == 0 { + return nil, fmt.Errorf("signature required") + } + + client, identity, err := server.GetClientFromSignature(signature) if err != nil { - return nil, fmt.Errorf("client not authenticated") + return nil, err } server.logger.Info("received ping from client", zap.String("client", identity.Name)) @@ -131,9 +142,13 @@ func (server *ecsRelayServer) CountConnected(ctx context.Context, request *pb.Co } func (server *ecsRelayServer) Subscribe(ctx context.Context, request *pb.SubscriptionRequest) (*pb.Subscription, error) { - client, err := server.GetClient(request.Identity) + if request.Signature == nil { + return nil, fmt.Errorf("signature required") + } + + client, identity, err := server.GetClientFromSignature(request.Signature) if err != nil { - return nil, fmt.Errorf("client not authenticated") + return nil, err } label := server.GetLabel(request.Subscription.Label) @@ -141,7 +156,7 @@ func (server *ecsRelayServer) Subscribe(ctx context.Context, request *pb.Subscri label.Subscribe(client) server.logger.Info("subscribed client to label", - zap.String("client", request.Identity.Name), + zap.String("client", identity.Name), zap.String("label", request.Subscription.Label), ) } else { @@ -152,9 +167,13 @@ func (server *ecsRelayServer) Subscribe(ctx context.Context, request *pb.Subscri } func (server *ecsRelayServer) Unsubscribe(ctx context.Context, request *pb.SubscriptionRequest) (*pb.Subscription, error) { - client, err := server.GetClient(request.Identity) + if request.Signature == nil { + return nil, fmt.Errorf("signature required") + } + + client, identity, err := server.GetClientFromSignature(request.Signature) if err != nil { - return nil, fmt.Errorf("client not authenticated") + return nil, err } label := server.GetLabel(request.Subscription.Label) @@ -165,7 +184,7 @@ func (server *ecsRelayServer) Unsubscribe(ctx context.Context, request *pb.Subsc } server.logger.Info("unsubscribed client from label", - zap.String("client", request.Identity.Name), + zap.String("client", identity.Name), zap.String("label", request.Subscription.Label), ) } else { @@ -175,10 +194,14 @@ func (server *ecsRelayServer) Unsubscribe(ctx context.Context, request *pb.Subsc return request.Subscription, nil } -func (server *ecsRelayServer) OpenStream(identity *pb.Identity, stream pb.ECSRelayService_OpenStreamServer) error { - client, err := server.GetClient(identity) +func (server *ecsRelayServer) OpenStream(signature *pb.Signature, stream pb.ECSRelayService_OpenStreamServer) error { + if len(signature.Signature) == 0 { + return fmt.Errorf("signature required") + } + + client, identity, err := server.GetClientFromSignature(signature) if err != nil { - return fmt.Errorf("client not authenticated") + return err } if !client.IsConnected() { @@ -203,19 +226,112 @@ func (server *ecsRelayServer) OpenStream(identity *pb.Identity, stream pb.ECSRel return nil } +func (server *ecsRelayServer) VerifyMessageSignature(message *pb.Message, identity *pb.Identity) (bool, string, error) { + // First encode the message. + messagePacked := fmt.Sprintf("(%d,%s,%s,%d)", message.Version, message.Id, crypto.Keccak256Hash(message.Data).Hex(), message.Timestamp) + + // Get the 'from' address, or if not specified, make an empty string placeholder, since the + // verification will fail anyways but the caller may want to use the recovered address. + var from string + if identity == nil { + from = "" + } else { + from = identity.Name + } + isVerified, recoveredAddress, err := utils.VerifySig( + from, + message.Signature, + []byte(messagePacked), + ) + return isVerified, recoveredAddress, err +} + +func (server *ecsRelayServer) VerifyMessage(message *pb.Message, identity *pb.Identity) error { + if message == nil { + return fmt.Errorf("message is not defined") + } + if identity == nil { + return fmt.Errorf("identity is not defined") + } + if len(message.Signature) == 0 { + return fmt.Errorf("signature is not defined") + } + + // Recover the signer to verify that it is the same identity as the one making the RPC call. + isVerified, recoveredAddress, err := server.VerifyMessageSignature(message, identity) + if err != nil { + return fmt.Errorf("error while verifying message: %s", err.Error()) + } + if !isVerified { + return fmt.Errorf("recovered signer %s != identity %s", recoveredAddress, identity.Name) + } + + // For every message verify that the timestamp is within an acceptable drift time. + messageAge := time.Since(time.Unix(message.Timestamp, 0)).Seconds() + if messageAge > float64(server.config.MessageDriftTime) { + return fmt.Errorf("message is older than acceptable drift: %.2f seconds old", messageAge) + } + + return nil +} + func (server *ecsRelayServer) Push(ctx context.Context, request *pb.PushRequest) (*pb.PushResponse, error) { - if request.Identity == nil { - return nil, fmt.Errorf("identity required when pushing a message") + if len(request.Message.Signature) == 0 { + return nil, fmt.Errorf("signature required") + } + + // When pushing a single message, we recover the sender from the message signature, which has + // different format then identity signature. + _, recoveredAddress, err := server.VerifyMessageSignature(request.Message, nil) + if err != nil { + return nil, err + } + + // Create an identity object from the address that signed the message. + identity := &pb.Identity{ + Name: recoveredAddress, + } + + _, err = server.GetClientFromIdentity(identity) + if err != nil { + return nil, err + } + + // Verify that the message is OK to relay. + message := request.Message + err = server.VerifyMessage(message, identity) + if err != nil { + server.logger.Info("not relaying message", zap.Error(err)) + return nil, err + } + + // Relay the message. + label := server.GetLabel(request.Label) + label.Propagate(message, identity) + + return &pb.PushResponse{}, nil +} + +func (server *ecsRelayServer) PushMany(ctx context.Context, request *pb.PushManyRequest) (*pb.PushResponse, error) { + if request.Signature == nil { + return nil, fmt.Errorf("signature required") } - _, err := server.GetClient(request.Identity) + _, identity, err := server.GetClientFromSignature(request.Signature) if err != nil { - return nil, fmt.Errorf("client not authenticated") + return nil, err } label := server.GetLabel(request.Label) for _, message := range request.Messages { - label.Propagate(message, request.Identity) + // Verify that the message is OK to relay. + err := server.VerifyMessage(message, identity) + if err != nil { + server.logger.Info("not relaying message", zap.Error(err)) + continue + } + // Relay the message. + label.Propagate(message, identity) } return &pb.PushResponse{}, nil } diff --git a/packages/services/pkg/relay/auth.go b/packages/services/pkg/relay/auth.go new file mode 100644 index 0000000000..65ce96bfdf --- /dev/null +++ b/packages/services/pkg/relay/auth.go @@ -0,0 +1,24 @@ +package relay + +import ( + "latticexyz/mud/packages/services/pkg/logger" + "latticexyz/mud/packages/services/pkg/utils" + pb "latticexyz/mud/packages/services/protobuf/go/ecs-relay" + + "go.uber.org/zap" +) + +func RecoverIdentity(signature *pb.Signature) (*pb.Identity, error) { + recoveredAddress, err := utils.RecoverSigAddress( + signature.Signature, + []byte("ecs-relay-service"), + ) + if err != nil { + logger.GetLogger().Info("error while recovering identity", zap.Error(err)) + return nil, err + } + + return &pb.Identity{ + Name: recoveredAddress, + }, nil +} diff --git a/packages/services/pkg/relay/core.go b/packages/services/pkg/relay/core.go index 71f36d14ab..b1c02a289b 100644 --- a/packages/services/pkg/relay/core.go +++ b/packages/services/pkg/relay/core.go @@ -13,6 +13,7 @@ import ( type RelayServerConfig struct { IdleTimeoutTime int IdleDisconnectIterval int + MessageDriftTime int } type Client struct { @@ -103,7 +104,7 @@ func GenerateRandomIdentifier() (string, error) { return crypto.Keccak256Hash(timestamp).Hex(), nil } -func (registry *ClientRegistry) GetClient(identity *pb.Identity) (*Client, error) { +func (registry *ClientRegistry) GetClientFromIdentity(identity *pb.Identity) (*Client, error) { registry.mutex.Lock() for _, client := range registry.clients { if client.identity.Name == identity.Name { @@ -112,7 +113,18 @@ func (registry *ClientRegistry) GetClient(identity *pb.Identity) (*Client, error } } registry.mutex.Unlock() - return nil, fmt.Errorf("client not registered") + return nil, fmt.Errorf("client not registered: %s", identity.Name) +} + +func (registry *ClientRegistry) GetClientFromSignature(signature *pb.Signature) (*Client, *pb.Identity, error) { + // First recover the identity from the signature. + identity, err := RecoverIdentity(signature) + if err != nil { + return nil, nil, err + } + // Now find the client corresponding to the identity. + client, err := registry.GetClientFromIdentity(identity) + return client, identity, err } func (registry *ClientRegistry) IsRegistered(identity *pb.Identity) bool { diff --git a/packages/services/pkg/utils/signature.go b/packages/services/pkg/utils/signature.go new file mode 100644 index 0000000000..b5c18e39e1 --- /dev/null +++ b/packages/services/pkg/utils/signature.go @@ -0,0 +1,40 @@ +package utils + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/accounts" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/crypto" +) + +func RecoverSigAddress(sigHex string, msg []byte) (address string, err error) { + defer func() { + // Recover from panic if one occured. Set err to nil otherwise. + if recover() != nil { + err = fmt.Errorf("error while recovering signer") + } + }() + + sig := hexutil.MustDecode(sigHex) + + msg = accounts.TextHash(msg) + if sig[crypto.RecoveryIDOffset] == 27 || sig[crypto.RecoveryIDOffset] == 28 { + sig[crypto.RecoveryIDOffset] -= 27 // Transform yellow paper V from 27/28 to 0/1 + } + + recovered, err := crypto.SigToPub(msg, sig) + if err != nil { + return "", err + } + + return crypto.PubkeyToAddress(*recovered).Hex(), nil +} + +func VerifySig(from string, sigHex string, msg []byte) (bool, string, error) { + // Recover address. + recovered, err := RecoverSigAddress(sigHex, msg) + + // Compare to provided address. + return from == recovered, recovered, err +} diff --git a/packages/services/proto/ecs-relay.proto b/packages/services/proto/ecs-relay.proto index b1e8e4c317..1347b42b4c 100644 --- a/packages/services/proto/ecs-relay.proto +++ b/packages/services/proto/ecs-relay.proto @@ -8,18 +8,24 @@ message Identity { string name = 1; } +// Signature that a client must provide to prove ownership of identity. +message Signature { + string signature = 1; +} + message Message { uint32 version = 1; - bytes data = 2; - int64 timestamp = 3; - string id = 4; + string id = 2; + bytes data = 3; + int64 timestamp = 4; + string signature = 5; } // The Relay Service definition. service ECSRelayService { - rpc Authenticate(Identity) returns (Identity) {} - rpc Revoke(Identity) returns (Identity) {} - rpc Ping(Identity) returns (Identity) {} + rpc Authenticate(Signature) returns (Identity) {} + rpc Revoke(Signature) returns (Identity) {} + rpc Ping(Signature) returns (Identity) {} rpc CountAuthenticated(CountIdentitiesRequest) returns (CountIdentitiesResponse) {} rpc CountConnected(CountIdentitiesRequest) returns (CountIdentitiesResponse) {} @@ -27,12 +33,17 @@ service ECSRelayService { rpc Subscribe(SubscriptionRequest) returns (Subscription) {} rpc Unsubscribe(SubscriptionRequest) returns (Subscription) {} - rpc OpenStream(Identity) returns (stream Message) {} + rpc OpenStream(Signature) returns (stream Message) {} + + // Push a single message to be relayed. rpc Push(PushRequest) returns (PushResponse) {} + + // Push a series of messages to be relayed. + rpc PushMany(PushManyRequest) returns (PushResponse) {} } message SubscriptionRequest { - Identity identity = 1; + Signature signature = 1; Subscription subscription = 2; } @@ -41,7 +52,12 @@ message Subscription { } message PushRequest { - Identity identity = 1; + string label = 1; + Message message = 2; +} + +message PushManyRequest { + Signature signature = 1; string label = 2; repeated Message messages = 3; } diff --git a/packages/services/protobuf/go/ecs-relay/ecs-relay.pb.go b/packages/services/protobuf/go/ecs-relay/ecs-relay.pb.go index e579d52ce4..09f9daedee 100644 --- a/packages/services/protobuf/go/ecs-relay/ecs-relay.pb.go +++ b/packages/services/protobuf/go/ecs-relay/ecs-relay.pb.go @@ -68,21 +68,70 @@ func (x *Identity) GetName() string { return "" } +// Signature that a client must provide to prove ownership of identity. +type Signature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *Signature) Reset() { + *x = Signature{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_ecs_relay_proto_msgTypes[1] + 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_proto_ecs_relay_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.ProtoReflect.Descriptor instead. +func (*Signature) Descriptor() ([]byte, []int) { + return file_proto_ecs_relay_proto_rawDescGZIP(), []int{1} +} + +func (x *Signature) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + type Message struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Signature string `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` } func (x *Message) Reset() { *x = Message{} if protoimpl.UnsafeEnabled { - mi := &file_proto_ecs_relay_proto_msgTypes[1] + mi := &file_proto_ecs_relay_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -95,7 +144,7 @@ func (x *Message) String() string { func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_proto_ecs_relay_proto_msgTypes[1] + mi := &file_proto_ecs_relay_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108,7 +157,7 @@ func (x *Message) ProtoReflect() protoreflect.Message { // Deprecated: Use Message.ProtoReflect.Descriptor instead. func (*Message) Descriptor() ([]byte, []int) { - return file_proto_ecs_relay_proto_rawDescGZIP(), []int{1} + return file_proto_ecs_relay_proto_rawDescGZIP(), []int{2} } func (x *Message) GetVersion() uint32 { @@ -118,6 +167,13 @@ func (x *Message) GetVersion() uint32 { return 0 } +func (x *Message) GetId() string { + if x != nil { + return x.Id + } + return "" +} + func (x *Message) GetData() []byte { if x != nil { return x.Data @@ -132,9 +188,9 @@ func (x *Message) GetTimestamp() int64 { return 0 } -func (x *Message) GetId() string { +func (x *Message) GetSignature() string { if x != nil { - return x.Id + return x.Signature } return "" } @@ -144,14 +200,14 @@ type SubscriptionRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Signature *Signature `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` Subscription *Subscription `protobuf:"bytes,2,opt,name=subscription,proto3" json:"subscription,omitempty"` } func (x *SubscriptionRequest) Reset() { *x = SubscriptionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_ecs_relay_proto_msgTypes[2] + mi := &file_proto_ecs_relay_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -164,7 +220,7 @@ func (x *SubscriptionRequest) String() string { func (*SubscriptionRequest) ProtoMessage() {} func (x *SubscriptionRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ecs_relay_proto_msgTypes[2] + mi := &file_proto_ecs_relay_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -177,12 +233,12 @@ func (x *SubscriptionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SubscriptionRequest.ProtoReflect.Descriptor instead. func (*SubscriptionRequest) Descriptor() ([]byte, []int) { - return file_proto_ecs_relay_proto_rawDescGZIP(), []int{2} + return file_proto_ecs_relay_proto_rawDescGZIP(), []int{3} } -func (x *SubscriptionRequest) GetIdentity() *Identity { +func (x *SubscriptionRequest) GetSignature() *Signature { if x != nil { - return x.Identity + return x.Signature } return nil } @@ -205,7 +261,7 @@ type Subscription struct { func (x *Subscription) Reset() { *x = Subscription{} if protoimpl.UnsafeEnabled { - mi := &file_proto_ecs_relay_proto_msgTypes[3] + mi := &file_proto_ecs_relay_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -218,7 +274,7 @@ func (x *Subscription) String() string { func (*Subscription) ProtoMessage() {} func (x *Subscription) ProtoReflect() protoreflect.Message { - mi := &file_proto_ecs_relay_proto_msgTypes[3] + mi := &file_proto_ecs_relay_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -231,7 +287,7 @@ func (x *Subscription) ProtoReflect() protoreflect.Message { // Deprecated: Use Subscription.ProtoReflect.Descriptor instead. func (*Subscription) Descriptor() ([]byte, []int) { - return file_proto_ecs_relay_proto_rawDescGZIP(), []int{3} + return file_proto_ecs_relay_proto_rawDescGZIP(), []int{4} } func (x *Subscription) GetLabel() string { @@ -246,15 +302,14 @@ type PushRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` - Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` + Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` + Message *Message `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` } func (x *PushRequest) Reset() { *x = PushRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_ecs_relay_proto_msgTypes[4] + mi := &file_proto_ecs_relay_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -267,7 +322,7 @@ func (x *PushRequest) String() string { func (*PushRequest) ProtoMessage() {} func (x *PushRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ecs_relay_proto_msgTypes[4] + mi := &file_proto_ecs_relay_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -280,24 +335,80 @@ func (x *PushRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PushRequest.ProtoReflect.Descriptor instead. func (*PushRequest) Descriptor() ([]byte, []int) { - return file_proto_ecs_relay_proto_rawDescGZIP(), []int{4} + return file_proto_ecs_relay_proto_rawDescGZIP(), []int{5} +} + +func (x *PushRequest) GetLabel() string { + if x != nil { + return x.Label + } + return "" } -func (x *PushRequest) GetIdentity() *Identity { +func (x *PushRequest) GetMessage() *Message { if x != nil { - return x.Identity + return x.Message } return nil } -func (x *PushRequest) GetLabel() string { +type PushManyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signature *Signature `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` + Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` +} + +func (x *PushManyRequest) Reset() { + *x = PushManyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_ecs_relay_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PushManyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushManyRequest) ProtoMessage() {} + +func (x *PushManyRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_ecs_relay_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 PushManyRequest.ProtoReflect.Descriptor instead. +func (*PushManyRequest) Descriptor() ([]byte, []int) { + return file_proto_ecs_relay_proto_rawDescGZIP(), []int{6} +} + +func (x *PushManyRequest) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *PushManyRequest) GetLabel() string { if x != nil { return x.Label } return "" } -func (x *PushRequest) GetMessages() []*Message { +func (x *PushManyRequest) GetMessages() []*Message { if x != nil { return x.Messages } @@ -313,7 +424,7 @@ type PushResponse struct { func (x *PushResponse) Reset() { *x = PushResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_ecs_relay_proto_msgTypes[5] + mi := &file_proto_ecs_relay_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -326,7 +437,7 @@ func (x *PushResponse) String() string { func (*PushResponse) ProtoMessage() {} func (x *PushResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_ecs_relay_proto_msgTypes[5] + mi := &file_proto_ecs_relay_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -339,7 +450,7 @@ func (x *PushResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PushResponse.ProtoReflect.Descriptor instead. func (*PushResponse) Descriptor() ([]byte, []int) { - return file_proto_ecs_relay_proto_rawDescGZIP(), []int{5} + return file_proto_ecs_relay_proto_rawDescGZIP(), []int{7} } type CountIdentitiesRequest struct { @@ -351,7 +462,7 @@ type CountIdentitiesRequest struct { func (x *CountIdentitiesRequest) Reset() { *x = CountIdentitiesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_ecs_relay_proto_msgTypes[6] + mi := &file_proto_ecs_relay_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -364,7 +475,7 @@ func (x *CountIdentitiesRequest) String() string { func (*CountIdentitiesRequest) ProtoMessage() {} func (x *CountIdentitiesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_ecs_relay_proto_msgTypes[6] + mi := &file_proto_ecs_relay_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -377,7 +488,7 @@ func (x *CountIdentitiesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CountIdentitiesRequest.ProtoReflect.Descriptor instead. func (*CountIdentitiesRequest) Descriptor() ([]byte, []int) { - return file_proto_ecs_relay_proto_rawDescGZIP(), []int{6} + return file_proto_ecs_relay_proto_rawDescGZIP(), []int{8} } type CountIdentitiesResponse struct { @@ -391,7 +502,7 @@ type CountIdentitiesResponse struct { func (x *CountIdentitiesResponse) Reset() { *x = CountIdentitiesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_ecs_relay_proto_msgTypes[7] + mi := &file_proto_ecs_relay_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -404,7 +515,7 @@ func (x *CountIdentitiesResponse) String() string { func (*CountIdentitiesResponse) ProtoMessage() {} func (x *CountIdentitiesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_ecs_relay_proto_msgTypes[7] + mi := &file_proto_ecs_relay_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -417,7 +528,7 @@ func (x *CountIdentitiesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CountIdentitiesResponse.ProtoReflect.Descriptor instead. func (*CountIdentitiesResponse) Descriptor() ([]byte, []int) { - return file_proto_ecs_relay_proto_rawDescGZIP(), []int{7} + return file_proto_ecs_relay_proto_rawDescGZIP(), []int{9} } func (x *CountIdentitiesResponse) GetCount() uint32 { @@ -434,78 +545,93 @@ var file_proto_ecs_relay_proto_rawDesc = []byte{ 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x22, 0x1e, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x65, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x81, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x2e, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x12, 0x3a, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, - 0x79, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x24, 0x0a, 0x0c, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x22, 0x82, 0x01, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x2d, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x65, 0x63, 0x73, - 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x75, 0x73, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x2f, 0x0a, 0x17, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x32, 0xe7, 0x04, 0x0a, 0x0f, 0x45, 0x43, 0x53, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, - 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, - 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x00, - 0x12, 0x32, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x12, 0x2e, 0x65, 0x63, 0x73, - 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x1a, 0x12, - 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x22, 0x00, 0x12, 0x30, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x2e, 0x65, - 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x12, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, - 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x20, 0x2e, 0x65, - 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, - 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x20, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, + 0x65, 0x22, 0x29, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 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, 0x22, 0x83, 0x01, 0x0a, + 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x3a, 0x0a, + 0x0c, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x24, 0x0a, 0x0c, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, + 0x50, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x12, 0x2b, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, + 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x22, 0x89, 0x01, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, + 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x2d, + 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x0e, 0x0a, + 0x0c, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x0a, + 0x16, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2f, 0x0a, 0x17, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xac, 0x05, 0x0a, 0x0f, 0x45, 0x43, 0x53, + 0x52, 0x65, 0x6c, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0c, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x13, 0x2e, 0x65, + 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x12, 0x13, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, + 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x04, + 0x50, 0x69, 0x6e, 0x67, 0x12, 0x13, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x72, + 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x5b, 0x0a, 0x12, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x20, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x65, 0x63, 0x73, 0x72, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x20, + 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x55, + 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x65, 0x63, 0x73, + 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, - 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x12, 0x1d, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x4f, 0x70, - 0x65, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x12, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, - 0x6c, 0x61, 0x79, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x1a, 0x11, 0x2e, 0x65, - 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, - 0x00, 0x30, 0x01, 0x12, 0x37, 0x0a, 0x04, 0x50, 0x75, 0x73, 0x68, 0x12, 0x15, 0x2e, 0x65, 0x63, - 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x50, 0x75, - 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x6f, 0x2f, 0x65, 0x63, 0x73, 0x2d, - 0x72, 0x65, 0x6c, 0x61, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x12, 0x13, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x11, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, + 0x79, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x37, 0x0a, + 0x04, 0x50, 0x75, 0x73, 0x68, 0x12, 0x15, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, + 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x65, + 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x08, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x61, + 0x6e, 0x79, 0x12, 0x19, 0x2e, 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x50, 0x75, + 0x73, 0x68, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x65, 0x63, 0x73, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x67, 0x6f, 0x2f, 0x65, 0x63, 0x73, 0x2d, 0x72, 0x65, 0x6c, 0x61, 0x79, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -520,45 +646,50 @@ func file_proto_ecs_relay_proto_rawDescGZIP() []byte { return file_proto_ecs_relay_proto_rawDescData } -var file_proto_ecs_relay_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_proto_ecs_relay_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_proto_ecs_relay_proto_goTypes = []interface{}{ (*Identity)(nil), // 0: ecsrelay.Identity - (*Message)(nil), // 1: ecsrelay.Message - (*SubscriptionRequest)(nil), // 2: ecsrelay.SubscriptionRequest - (*Subscription)(nil), // 3: ecsrelay.Subscription - (*PushRequest)(nil), // 4: ecsrelay.PushRequest - (*PushResponse)(nil), // 5: ecsrelay.PushResponse - (*CountIdentitiesRequest)(nil), // 6: ecsrelay.CountIdentitiesRequest - (*CountIdentitiesResponse)(nil), // 7: ecsrelay.CountIdentitiesResponse + (*Signature)(nil), // 1: ecsrelay.Signature + (*Message)(nil), // 2: ecsrelay.Message + (*SubscriptionRequest)(nil), // 3: ecsrelay.SubscriptionRequest + (*Subscription)(nil), // 4: ecsrelay.Subscription + (*PushRequest)(nil), // 5: ecsrelay.PushRequest + (*PushManyRequest)(nil), // 6: ecsrelay.PushManyRequest + (*PushResponse)(nil), // 7: ecsrelay.PushResponse + (*CountIdentitiesRequest)(nil), // 8: ecsrelay.CountIdentitiesRequest + (*CountIdentitiesResponse)(nil), // 9: ecsrelay.CountIdentitiesResponse } var file_proto_ecs_relay_proto_depIdxs = []int32{ - 0, // 0: ecsrelay.SubscriptionRequest.identity:type_name -> ecsrelay.Identity - 3, // 1: ecsrelay.SubscriptionRequest.subscription:type_name -> ecsrelay.Subscription - 0, // 2: ecsrelay.PushRequest.identity:type_name -> ecsrelay.Identity - 1, // 3: ecsrelay.PushRequest.messages:type_name -> ecsrelay.Message - 0, // 4: ecsrelay.ECSRelayService.Authenticate:input_type -> ecsrelay.Identity - 0, // 5: ecsrelay.ECSRelayService.Revoke:input_type -> ecsrelay.Identity - 0, // 6: ecsrelay.ECSRelayService.Ping:input_type -> ecsrelay.Identity - 6, // 7: ecsrelay.ECSRelayService.CountAuthenticated:input_type -> ecsrelay.CountIdentitiesRequest - 6, // 8: ecsrelay.ECSRelayService.CountConnected:input_type -> ecsrelay.CountIdentitiesRequest - 2, // 9: ecsrelay.ECSRelayService.Subscribe:input_type -> ecsrelay.SubscriptionRequest - 2, // 10: ecsrelay.ECSRelayService.Unsubscribe:input_type -> ecsrelay.SubscriptionRequest - 0, // 11: ecsrelay.ECSRelayService.OpenStream:input_type -> ecsrelay.Identity - 4, // 12: ecsrelay.ECSRelayService.Push:input_type -> ecsrelay.PushRequest - 0, // 13: ecsrelay.ECSRelayService.Authenticate:output_type -> ecsrelay.Identity - 0, // 14: ecsrelay.ECSRelayService.Revoke:output_type -> ecsrelay.Identity - 0, // 15: ecsrelay.ECSRelayService.Ping:output_type -> ecsrelay.Identity - 7, // 16: ecsrelay.ECSRelayService.CountAuthenticated:output_type -> ecsrelay.CountIdentitiesResponse - 7, // 17: ecsrelay.ECSRelayService.CountConnected:output_type -> ecsrelay.CountIdentitiesResponse - 3, // 18: ecsrelay.ECSRelayService.Subscribe:output_type -> ecsrelay.Subscription - 3, // 19: ecsrelay.ECSRelayService.Unsubscribe:output_type -> ecsrelay.Subscription - 1, // 20: ecsrelay.ECSRelayService.OpenStream:output_type -> ecsrelay.Message - 5, // 21: ecsrelay.ECSRelayService.Push:output_type -> ecsrelay.PushResponse - 13, // [13:22] is the sub-list for method output_type - 4, // [4:13] 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 + 1, // 0: ecsrelay.SubscriptionRequest.signature:type_name -> ecsrelay.Signature + 4, // 1: ecsrelay.SubscriptionRequest.subscription:type_name -> ecsrelay.Subscription + 2, // 2: ecsrelay.PushRequest.message:type_name -> ecsrelay.Message + 1, // 3: ecsrelay.PushManyRequest.signature:type_name -> ecsrelay.Signature + 2, // 4: ecsrelay.PushManyRequest.messages:type_name -> ecsrelay.Message + 1, // 5: ecsrelay.ECSRelayService.Authenticate:input_type -> ecsrelay.Signature + 1, // 6: ecsrelay.ECSRelayService.Revoke:input_type -> ecsrelay.Signature + 1, // 7: ecsrelay.ECSRelayService.Ping:input_type -> ecsrelay.Signature + 8, // 8: ecsrelay.ECSRelayService.CountAuthenticated:input_type -> ecsrelay.CountIdentitiesRequest + 8, // 9: ecsrelay.ECSRelayService.CountConnected:input_type -> ecsrelay.CountIdentitiesRequest + 3, // 10: ecsrelay.ECSRelayService.Subscribe:input_type -> ecsrelay.SubscriptionRequest + 3, // 11: ecsrelay.ECSRelayService.Unsubscribe:input_type -> ecsrelay.SubscriptionRequest + 1, // 12: ecsrelay.ECSRelayService.OpenStream:input_type -> ecsrelay.Signature + 5, // 13: ecsrelay.ECSRelayService.Push:input_type -> ecsrelay.PushRequest + 6, // 14: ecsrelay.ECSRelayService.PushMany:input_type -> ecsrelay.PushManyRequest + 0, // 15: ecsrelay.ECSRelayService.Authenticate:output_type -> ecsrelay.Identity + 0, // 16: ecsrelay.ECSRelayService.Revoke:output_type -> ecsrelay.Identity + 0, // 17: ecsrelay.ECSRelayService.Ping:output_type -> ecsrelay.Identity + 9, // 18: ecsrelay.ECSRelayService.CountAuthenticated:output_type -> ecsrelay.CountIdentitiesResponse + 9, // 19: ecsrelay.ECSRelayService.CountConnected:output_type -> ecsrelay.CountIdentitiesResponse + 4, // 20: ecsrelay.ECSRelayService.Subscribe:output_type -> ecsrelay.Subscription + 4, // 21: ecsrelay.ECSRelayService.Unsubscribe:output_type -> ecsrelay.Subscription + 2, // 22: ecsrelay.ECSRelayService.OpenStream:output_type -> ecsrelay.Message + 7, // 23: ecsrelay.ECSRelayService.Push:output_type -> ecsrelay.PushResponse + 7, // 24: ecsrelay.ECSRelayService.PushMany:output_type -> ecsrelay.PushResponse + 15, // [15:25] is the sub-list for method output_type + 5, // [5:15] 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_proto_ecs_relay_proto_init() } @@ -580,7 +711,7 @@ func file_proto_ecs_relay_proto_init() { } } file_proto_ecs_relay_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message); i { + switch v := v.(*Signature); i { case 0: return &v.state case 1: @@ -592,7 +723,7 @@ func file_proto_ecs_relay_proto_init() { } } file_proto_ecs_relay_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubscriptionRequest); i { + switch v := v.(*Message); i { case 0: return &v.state case 1: @@ -604,7 +735,7 @@ func file_proto_ecs_relay_proto_init() { } } file_proto_ecs_relay_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Subscription); i { + switch v := v.(*SubscriptionRequest); i { case 0: return &v.state case 1: @@ -616,7 +747,7 @@ func file_proto_ecs_relay_proto_init() { } } file_proto_ecs_relay_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushRequest); i { + switch v := v.(*Subscription); i { case 0: return &v.state case 1: @@ -628,7 +759,7 @@ func file_proto_ecs_relay_proto_init() { } } file_proto_ecs_relay_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushResponse); i { + switch v := v.(*PushRequest); i { case 0: return &v.state case 1: @@ -640,7 +771,7 @@ func file_proto_ecs_relay_proto_init() { } } file_proto_ecs_relay_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CountIdentitiesRequest); i { + switch v := v.(*PushManyRequest); i { case 0: return &v.state case 1: @@ -652,6 +783,30 @@ func file_proto_ecs_relay_proto_init() { } } file_proto_ecs_relay_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_ecs_relay_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CountIdentitiesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_ecs_relay_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CountIdentitiesResponse); i { case 0: return &v.state @@ -670,7 +825,7 @@ func file_proto_ecs_relay_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_ecs_relay_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/packages/services/protobuf/go/ecs-relay/ecs-relay_grpc.pb.go b/packages/services/protobuf/go/ecs-relay/ecs-relay_grpc.pb.go index 22f1109fc8..15d4059e15 100644 --- a/packages/services/protobuf/go/ecs-relay/ecs-relay_grpc.pb.go +++ b/packages/services/protobuf/go/ecs-relay/ecs-relay_grpc.pb.go @@ -22,15 +22,18 @@ const _ = grpc.SupportPackageIsVersion7 // // 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 ECSRelayServiceClient interface { - Authenticate(ctx context.Context, in *Identity, opts ...grpc.CallOption) (*Identity, error) - Revoke(ctx context.Context, in *Identity, opts ...grpc.CallOption) (*Identity, error) - Ping(ctx context.Context, in *Identity, opts ...grpc.CallOption) (*Identity, error) + Authenticate(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error) + Revoke(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error) + Ping(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error) CountAuthenticated(ctx context.Context, in *CountIdentitiesRequest, opts ...grpc.CallOption) (*CountIdentitiesResponse, error) CountConnected(ctx context.Context, in *CountIdentitiesRequest, opts ...grpc.CallOption) (*CountIdentitiesResponse, error) Subscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error) Unsubscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error) - OpenStream(ctx context.Context, in *Identity, opts ...grpc.CallOption) (ECSRelayService_OpenStreamClient, error) + OpenStream(ctx context.Context, in *Signature, opts ...grpc.CallOption) (ECSRelayService_OpenStreamClient, error) + // Push a single message to be relayed. Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error) + // Push a series of messages to be relayed. + PushMany(ctx context.Context, in *PushManyRequest, opts ...grpc.CallOption) (*PushResponse, error) } type eCSRelayServiceClient struct { @@ -41,7 +44,7 @@ func NewECSRelayServiceClient(cc grpc.ClientConnInterface) ECSRelayServiceClient return &eCSRelayServiceClient{cc} } -func (c *eCSRelayServiceClient) Authenticate(ctx context.Context, in *Identity, opts ...grpc.CallOption) (*Identity, error) { +func (c *eCSRelayServiceClient) Authenticate(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error) { out := new(Identity) err := c.cc.Invoke(ctx, "/ecsrelay.ECSRelayService/Authenticate", in, out, opts...) if err != nil { @@ -50,7 +53,7 @@ func (c *eCSRelayServiceClient) Authenticate(ctx context.Context, in *Identity, return out, nil } -func (c *eCSRelayServiceClient) Revoke(ctx context.Context, in *Identity, opts ...grpc.CallOption) (*Identity, error) { +func (c *eCSRelayServiceClient) Revoke(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error) { out := new(Identity) err := c.cc.Invoke(ctx, "/ecsrelay.ECSRelayService/Revoke", in, out, opts...) if err != nil { @@ -59,7 +62,7 @@ func (c *eCSRelayServiceClient) Revoke(ctx context.Context, in *Identity, opts . return out, nil } -func (c *eCSRelayServiceClient) Ping(ctx context.Context, in *Identity, opts ...grpc.CallOption) (*Identity, error) { +func (c *eCSRelayServiceClient) Ping(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error) { out := new(Identity) err := c.cc.Invoke(ctx, "/ecsrelay.ECSRelayService/Ping", in, out, opts...) if err != nil { @@ -104,7 +107,7 @@ func (c *eCSRelayServiceClient) Unsubscribe(ctx context.Context, in *Subscriptio return out, nil } -func (c *eCSRelayServiceClient) OpenStream(ctx context.Context, in *Identity, opts ...grpc.CallOption) (ECSRelayService_OpenStreamClient, error) { +func (c *eCSRelayServiceClient) OpenStream(ctx context.Context, in *Signature, opts ...grpc.CallOption) (ECSRelayService_OpenStreamClient, error) { stream, err := c.cc.NewStream(ctx, &ECSRelayService_ServiceDesc.Streams[0], "/ecsrelay.ECSRelayService/OpenStream", opts...) if err != nil { return nil, err @@ -145,19 +148,31 @@ func (c *eCSRelayServiceClient) Push(ctx context.Context, in *PushRequest, opts return out, nil } +func (c *eCSRelayServiceClient) PushMany(ctx context.Context, in *PushManyRequest, opts ...grpc.CallOption) (*PushResponse, error) { + out := new(PushResponse) + err := c.cc.Invoke(ctx, "/ecsrelay.ECSRelayService/PushMany", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ECSRelayServiceServer is the server API for ECSRelayService service. // All implementations must embed UnimplementedECSRelayServiceServer // for forward compatibility type ECSRelayServiceServer interface { - Authenticate(context.Context, *Identity) (*Identity, error) - Revoke(context.Context, *Identity) (*Identity, error) - Ping(context.Context, *Identity) (*Identity, error) + Authenticate(context.Context, *Signature) (*Identity, error) + Revoke(context.Context, *Signature) (*Identity, error) + Ping(context.Context, *Signature) (*Identity, error) CountAuthenticated(context.Context, *CountIdentitiesRequest) (*CountIdentitiesResponse, error) CountConnected(context.Context, *CountIdentitiesRequest) (*CountIdentitiesResponse, error) Subscribe(context.Context, *SubscriptionRequest) (*Subscription, error) Unsubscribe(context.Context, *SubscriptionRequest) (*Subscription, error) - OpenStream(*Identity, ECSRelayService_OpenStreamServer) error + OpenStream(*Signature, ECSRelayService_OpenStreamServer) error + // Push a single message to be relayed. Push(context.Context, *PushRequest) (*PushResponse, error) + // Push a series of messages to be relayed. + PushMany(context.Context, *PushManyRequest) (*PushResponse, error) mustEmbedUnimplementedECSRelayServiceServer() } @@ -165,13 +180,13 @@ type ECSRelayServiceServer interface { type UnimplementedECSRelayServiceServer struct { } -func (UnimplementedECSRelayServiceServer) Authenticate(context.Context, *Identity) (*Identity, error) { +func (UnimplementedECSRelayServiceServer) Authenticate(context.Context, *Signature) (*Identity, error) { return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented") } -func (UnimplementedECSRelayServiceServer) Revoke(context.Context, *Identity) (*Identity, error) { +func (UnimplementedECSRelayServiceServer) Revoke(context.Context, *Signature) (*Identity, error) { return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented") } -func (UnimplementedECSRelayServiceServer) Ping(context.Context, *Identity) (*Identity, error) { +func (UnimplementedECSRelayServiceServer) Ping(context.Context, *Signature) (*Identity, error) { return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") } func (UnimplementedECSRelayServiceServer) CountAuthenticated(context.Context, *CountIdentitiesRequest) (*CountIdentitiesResponse, error) { @@ -186,12 +201,15 @@ func (UnimplementedECSRelayServiceServer) Subscribe(context.Context, *Subscripti func (UnimplementedECSRelayServiceServer) Unsubscribe(context.Context, *SubscriptionRequest) (*Subscription, error) { return nil, status.Errorf(codes.Unimplemented, "method Unsubscribe not implemented") } -func (UnimplementedECSRelayServiceServer) OpenStream(*Identity, ECSRelayService_OpenStreamServer) error { +func (UnimplementedECSRelayServiceServer) OpenStream(*Signature, ECSRelayService_OpenStreamServer) error { return status.Errorf(codes.Unimplemented, "method OpenStream not implemented") } func (UnimplementedECSRelayServiceServer) Push(context.Context, *PushRequest) (*PushResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Push not implemented") } +func (UnimplementedECSRelayServiceServer) PushMany(context.Context, *PushManyRequest) (*PushResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PushMany not implemented") +} func (UnimplementedECSRelayServiceServer) mustEmbedUnimplementedECSRelayServiceServer() {} // UnsafeECSRelayServiceServer may be embedded to opt out of forward compatibility for this service. @@ -206,7 +224,7 @@ func RegisterECSRelayServiceServer(s grpc.ServiceRegistrar, srv ECSRelayServiceS } func _ECSRelayService_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Identity) + in := new(Signature) if err := dec(in); err != nil { return nil, err } @@ -218,13 +236,13 @@ func _ECSRelayService_Authenticate_Handler(srv interface{}, ctx context.Context, FullMethod: "/ecsrelay.ECSRelayService/Authenticate", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ECSRelayServiceServer).Authenticate(ctx, req.(*Identity)) + return srv.(ECSRelayServiceServer).Authenticate(ctx, req.(*Signature)) } return interceptor(ctx, in, info, handler) } func _ECSRelayService_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Identity) + in := new(Signature) if err := dec(in); err != nil { return nil, err } @@ -236,13 +254,13 @@ func _ECSRelayService_Revoke_Handler(srv interface{}, ctx context.Context, dec f FullMethod: "/ecsrelay.ECSRelayService/Revoke", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ECSRelayServiceServer).Revoke(ctx, req.(*Identity)) + return srv.(ECSRelayServiceServer).Revoke(ctx, req.(*Signature)) } return interceptor(ctx, in, info, handler) } func _ECSRelayService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Identity) + in := new(Signature) if err := dec(in); err != nil { return nil, err } @@ -254,7 +272,7 @@ func _ECSRelayService_Ping_Handler(srv interface{}, ctx context.Context, dec fun FullMethod: "/ecsrelay.ECSRelayService/Ping", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ECSRelayServiceServer).Ping(ctx, req.(*Identity)) + return srv.(ECSRelayServiceServer).Ping(ctx, req.(*Signature)) } return interceptor(ctx, in, info, handler) } @@ -332,7 +350,7 @@ func _ECSRelayService_Unsubscribe_Handler(srv interface{}, ctx context.Context, } func _ECSRelayService_OpenStream_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(Identity) + m := new(Signature) if err := stream.RecvMsg(m); err != nil { return err } @@ -370,6 +388,24 @@ func _ECSRelayService_Push_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _ECSRelayService_PushMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushManyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ECSRelayServiceServer).PushMany(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ecsrelay.ECSRelayService/PushMany", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ECSRelayServiceServer).PushMany(ctx, req.(*PushManyRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ECSRelayService_ServiceDesc is the grpc.ServiceDesc for ECSRelayService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -409,6 +445,10 @@ var ECSRelayService_ServiceDesc = grpc.ServiceDesc{ MethodName: "Push", Handler: _ECSRelayService_Push_Handler, }, + { + MethodName: "PushMany", + Handler: _ECSRelayService_PushMany_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/packages/services/protobuf/ts/ecs-relay/ecs-relay.client.ts b/packages/services/protobuf/ts/ecs-relay/ecs-relay.client.ts index a333997072..5323fbbe2c 100644 --- a/packages/services/protobuf/ts/ecs-relay/ecs-relay.client.ts +++ b/packages/services/protobuf/ts/ecs-relay/ecs-relay.client.ts @@ -1,10 +1,11 @@ /* eslint-disable */ -// @generated by protobuf-ts 2.8.1 with parameter eslint_disable +// @generated by protobuf-ts 2.8.0 with parameter eslint_disable // @generated from protobuf file "ecs-relay.proto" (package "ecsrelay", syntax proto3) // tslint:disable import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; import { ECSRelayService } from "./ecs-relay"; +import type { PushManyRequest } from "./ecs-relay"; import type { PushResponse } from "./ecs-relay"; import type { PushRequest } from "./ecs-relay"; import type { Message } from "./ecs-relay"; @@ -15,6 +16,7 @@ import type { CountIdentitiesResponse } from "./ecs-relay"; import type { CountIdentitiesRequest } from "./ecs-relay"; import { stackIntercept } from "@protobuf-ts/runtime-rpc"; import type { Identity } from "./ecs-relay"; +import type { Signature } from "./ecs-relay"; import type { UnaryCall } from "@protobuf-ts/runtime-rpc"; import type { RpcOptions } from "@protobuf-ts/runtime-rpc"; /** @@ -24,17 +26,17 @@ import type { RpcOptions } from "@protobuf-ts/runtime-rpc"; */ export interface IECSRelayServiceClient { /** - * @generated from protobuf rpc: Authenticate(ecsrelay.Identity) returns (ecsrelay.Identity); + * @generated from protobuf rpc: Authenticate(ecsrelay.Signature) returns (ecsrelay.Identity); */ - authenticate(input: Identity, options?: RpcOptions): UnaryCall; + authenticate(input: Signature, options?: RpcOptions): UnaryCall; /** - * @generated from protobuf rpc: Revoke(ecsrelay.Identity) returns (ecsrelay.Identity); + * @generated from protobuf rpc: Revoke(ecsrelay.Signature) returns (ecsrelay.Identity); */ - revoke(input: Identity, options?: RpcOptions): UnaryCall; + revoke(input: Signature, options?: RpcOptions): UnaryCall; /** - * @generated from protobuf rpc: Ping(ecsrelay.Identity) returns (ecsrelay.Identity); + * @generated from protobuf rpc: Ping(ecsrelay.Signature) returns (ecsrelay.Identity); */ - ping(input: Identity, options?: RpcOptions): UnaryCall; + ping(input: Signature, options?: RpcOptions): UnaryCall; /** * @generated from protobuf rpc: CountAuthenticated(ecsrelay.CountIdentitiesRequest) returns (ecsrelay.CountIdentitiesResponse); */ @@ -58,13 +60,21 @@ export interface IECSRelayServiceClient { */ unsubscribe(input: SubscriptionRequest, options?: RpcOptions): UnaryCall; /** - * @generated from protobuf rpc: OpenStream(ecsrelay.Identity) returns (stream ecsrelay.Message); + * @generated from protobuf rpc: OpenStream(ecsrelay.Signature) returns (stream ecsrelay.Message); */ - openStream(input: Identity, options?: RpcOptions): ServerStreamingCall; + openStream(input: Signature, options?: RpcOptions): ServerStreamingCall; /** + * Push a single message to be relayed. + * * @generated from protobuf rpc: Push(ecsrelay.PushRequest) returns (ecsrelay.PushResponse); */ push(input: PushRequest, options?: RpcOptions): UnaryCall; + /** + * Push a series of messages to be relayed. + * + * @generated from protobuf rpc: PushMany(ecsrelay.PushManyRequest) returns (ecsrelay.PushResponse); + */ + pushMany(input: PushManyRequest, options?: RpcOptions): UnaryCall; } /** * The Relay Service definition. @@ -77,28 +87,28 @@ export class ECSRelayServiceClient implements IECSRelayServiceClient, ServiceInf options = ECSRelayService.options; constructor(private readonly _transport: RpcTransport) {} /** - * @generated from protobuf rpc: Authenticate(ecsrelay.Identity) returns (ecsrelay.Identity); + * @generated from protobuf rpc: Authenticate(ecsrelay.Signature) returns (ecsrelay.Identity); */ - authenticate(input: Identity, options?: RpcOptions): UnaryCall { + authenticate(input: Signature, options?: RpcOptions): UnaryCall { const method = this.methods[0], opt = this._transport.mergeOptions(options); - return stackIntercept("unary", this._transport, method, opt, input); + return stackIntercept("unary", this._transport, method, opt, input); } /** - * @generated from protobuf rpc: Revoke(ecsrelay.Identity) returns (ecsrelay.Identity); + * @generated from protobuf rpc: Revoke(ecsrelay.Signature) returns (ecsrelay.Identity); */ - revoke(input: Identity, options?: RpcOptions): UnaryCall { + revoke(input: Signature, options?: RpcOptions): UnaryCall { const method = this.methods[1], opt = this._transport.mergeOptions(options); - return stackIntercept("unary", this._transport, method, opt, input); + return stackIntercept("unary", this._transport, method, opt, input); } /** - * @generated from protobuf rpc: Ping(ecsrelay.Identity) returns (ecsrelay.Identity); + * @generated from protobuf rpc: Ping(ecsrelay.Signature) returns (ecsrelay.Identity); */ - ping(input: Identity, options?: RpcOptions): UnaryCall { + ping(input: Signature, options?: RpcOptions): UnaryCall { const method = this.methods[2], opt = this._transport.mergeOptions(options); - return stackIntercept("unary", this._transport, method, opt, input); + return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: CountAuthenticated(ecsrelay.CountIdentitiesRequest) returns (ecsrelay.CountIdentitiesResponse); @@ -151,14 +161,16 @@ export class ECSRelayServiceClient implements IECSRelayServiceClient, ServiceInf return stackIntercept("unary", this._transport, method, opt, input); } /** - * @generated from protobuf rpc: OpenStream(ecsrelay.Identity) returns (stream ecsrelay.Message); + * @generated from protobuf rpc: OpenStream(ecsrelay.Signature) returns (stream ecsrelay.Message); */ - openStream(input: Identity, options?: RpcOptions): ServerStreamingCall { + openStream(input: Signature, options?: RpcOptions): ServerStreamingCall { const method = this.methods[7], opt = this._transport.mergeOptions(options); - return stackIntercept("serverStreaming", this._transport, method, opt, input); + return stackIntercept("serverStreaming", this._transport, method, opt, input); } /** + * Push a single message to be relayed. + * * @generated from protobuf rpc: Push(ecsrelay.PushRequest) returns (ecsrelay.PushResponse); */ push(input: PushRequest, options?: RpcOptions): UnaryCall { @@ -166,4 +178,14 @@ export class ECSRelayServiceClient implements IECSRelayServiceClient, ServiceInf opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } + /** + * Push a series of messages to be relayed. + * + * @generated from protobuf rpc: PushMany(ecsrelay.PushManyRequest) returns (ecsrelay.PushResponse); + */ + pushMany(input: PushManyRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[9], + opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } } diff --git a/packages/services/protobuf/ts/ecs-relay/ecs-relay.ts b/packages/services/protobuf/ts/ecs-relay/ecs-relay.ts index 0f85fa819a..82aef7f4b9 100644 --- a/packages/services/protobuf/ts/ecs-relay/ecs-relay.ts +++ b/packages/services/protobuf/ts/ecs-relay/ecs-relay.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -// @generated by protobuf-ts 2.8.1 with parameter eslint_disable +// @generated by protobuf-ts 2.8.0 with parameter eslint_disable // @generated from protobuf file "ecs-relay.proto" (package "ecsrelay", syntax proto3) // tslint:disable import { ServiceType } from "@protobuf-ts/runtime-rpc"; @@ -24,6 +24,17 @@ export interface Identity { */ name: string; } +/** + * Signature that a client must provide to prove ownership of identity. + * + * @generated from protobuf message ecsrelay.Signature + */ +export interface Signature { + /** + * @generated from protobuf field: string signature = 1; + */ + signature: string; +} /** * @generated from protobuf message ecsrelay.Message */ @@ -33,26 +44,30 @@ export interface Message { */ version: number; /** - * @generated from protobuf field: bytes data = 2; + * @generated from protobuf field: string id = 2; + */ + id: string; + /** + * @generated from protobuf field: bytes data = 3; */ data: Uint8Array; /** - * @generated from protobuf field: int64 timestamp = 3; + * @generated from protobuf field: int64 timestamp = 4; */ timestamp: bigint; /** - * @generated from protobuf field: string id = 4; + * @generated from protobuf field: string signature = 5; */ - id: string; + signature: string; } /** * @generated from protobuf message ecsrelay.SubscriptionRequest */ export interface SubscriptionRequest { /** - * @generated from protobuf field: ecsrelay.Identity identity = 1; + * @generated from protobuf field: ecsrelay.Signature signature = 1; */ - identity?: Identity; + signature?: Signature; /** * @generated from protobuf field: ecsrelay.Subscription subscription = 2; */ @@ -72,9 +87,22 @@ export interface Subscription { */ export interface PushRequest { /** - * @generated from protobuf field: ecsrelay.Identity identity = 1; + * @generated from protobuf field: string label = 1; + */ + label: string; + /** + * @generated from protobuf field: ecsrelay.Message message = 2; */ - identity?: Identity; + message?: Message; +} +/** + * @generated from protobuf message ecsrelay.PushManyRequest + */ +export interface PushManyRequest { + /** + * @generated from protobuf field: ecsrelay.Signature signature = 1; + */ + signature?: Signature; /** * @generated from protobuf field: string label = 2; */ @@ -144,17 +172,60 @@ class Identity$Type extends MessageType { */ export const Identity = new Identity$Type(); // @generated message type with reflection information, may provide speed optimized methods +class Signature$Type extends MessageType { + constructor() { + super("ecsrelay.Signature", [{ no: 1, name: "signature", kind: "scalar", T: 9 /*ScalarType.STRING*/ }]); + } + create(value?: PartialMessage): Signature { + const message = { signature: "" }; + globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== undefined) reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Signature): Signature { + let message = target ?? this.create(), + end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string signature */ 1: + message.signature = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: Signature, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string signature = 1; */ + if (message.signature !== "") writer.tag(1, WireType.LengthDelimited).string(message.signature); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message ecsrelay.Signature + */ +export const Signature = new Signature$Type(); +// @generated message type with reflection information, may provide speed optimized methods class Message$Type extends MessageType { constructor() { super("ecsrelay.Message", [ { no: 1, name: "version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, - { no: 2, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, - { no: 3, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 4, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 5, name: "signature", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, ]); } create(value?: PartialMessage): Message { - const message = { version: 0, data: new Uint8Array(0), timestamp: 0n, id: "" }; + const message = { version: 0, id: "", data: new Uint8Array(0), timestamp: 0n, signature: "" }; globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -168,14 +239,17 @@ class Message$Type extends MessageType { case /* uint32 version */ 1: message.version = reader.uint32(); break; - case /* bytes data */ 2: + case /* string id */ 2: + message.id = reader.string(); + break; + case /* bytes data */ 3: message.data = reader.bytes(); break; - case /* int64 timestamp */ 3: + case /* int64 timestamp */ 4: message.timestamp = reader.int64().toBigInt(); break; - case /* string id */ 4: - message.id = reader.string(); + case /* string signature */ 5: + message.signature = reader.string(); break; default: let u = options.readUnknownField; @@ -190,12 +264,14 @@ class Message$Type extends MessageType { internalBinaryWrite(message: Message, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* uint32 version = 1; */ if (message.version !== 0) writer.tag(1, WireType.Varint).uint32(message.version); - /* bytes data = 2; */ - if (message.data.length) writer.tag(2, WireType.LengthDelimited).bytes(message.data); - /* int64 timestamp = 3; */ - if (message.timestamp !== 0n) writer.tag(3, WireType.Varint).int64(message.timestamp); - /* string id = 4; */ - if (message.id !== "") writer.tag(4, WireType.LengthDelimited).string(message.id); + /* string id = 2; */ + if (message.id !== "") writer.tag(2, WireType.LengthDelimited).string(message.id); + /* bytes data = 3; */ + if (message.data.length) writer.tag(3, WireType.LengthDelimited).bytes(message.data); + /* int64 timestamp = 4; */ + if (message.timestamp !== 0n) writer.tag(4, WireType.Varint).int64(message.timestamp); + /* string signature = 5; */ + if (message.signature !== "") writer.tag(5, WireType.LengthDelimited).string(message.signature); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); return writer; @@ -209,7 +285,7 @@ export const Message = new Message$Type(); class SubscriptionRequest$Type extends MessageType { constructor() { super("ecsrelay.SubscriptionRequest", [ - { no: 1, name: "identity", kind: "message", T: () => Identity }, + { no: 1, name: "signature", kind: "message", T: () => Signature }, { no: 2, name: "subscription", kind: "message", T: () => Subscription }, ]); } @@ -230,8 +306,8 @@ class SubscriptionRequest$Type extends MessageType { while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { - case /* ecsrelay.Identity identity */ 1: - message.identity = Identity.internalBinaryRead(reader, reader.uint32(), options, message.identity); + case /* ecsrelay.Signature signature */ 1: + message.signature = Signature.internalBinaryRead(reader, reader.uint32(), options, message.signature); break; case /* ecsrelay.Subscription subscription */ 2: message.subscription = Subscription.internalBinaryRead( @@ -252,9 +328,9 @@ class SubscriptionRequest$Type extends MessageType { return message; } internalBinaryWrite(message: SubscriptionRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* ecsrelay.Identity identity = 1; */ - if (message.identity) - Identity.internalBinaryWrite(message.identity, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* ecsrelay.Signature signature = 1; */ + if (message.signature) + Signature.internalBinaryWrite(message.signature, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); /* ecsrelay.Subscription subscription = 2; */ if (message.subscription) Subscription.internalBinaryWrite( @@ -322,13 +398,12 @@ export const Subscription = new Subscription$Type(); class PushRequest$Type extends MessageType { constructor() { super("ecsrelay.PushRequest", [ - { no: 1, name: "identity", kind: "message", T: () => Identity }, - { no: 2, name: "label", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "messages", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Message }, + { no: 1, name: "label", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "message", kind: "message", T: () => Message }, ]); } create(value?: PartialMessage): PushRequest { - const message = { label: "", messages: [] }; + const message = { label: "" }; globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -344,8 +419,65 @@ class PushRequest$Type extends MessageType { while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); switch (fieldNo) { - case /* ecsrelay.Identity identity */ 1: - message.identity = Identity.internalBinaryRead(reader, reader.uint32(), options, message.identity); + case /* string label */ 1: + message.label = reader.string(); + break; + case /* ecsrelay.Message message */ 2: + message.message = Message.internalBinaryRead(reader, reader.uint32(), options, message.message); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: PushRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string label = 1; */ + if (message.label !== "") writer.tag(1, WireType.LengthDelimited).string(message.label); + /* ecsrelay.Message message = 2; */ + if (message.message) + Message.internalBinaryWrite(message.message, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message ecsrelay.PushRequest + */ +export const PushRequest = new PushRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class PushManyRequest$Type extends MessageType { + constructor() { + super("ecsrelay.PushManyRequest", [ + { no: 1, name: "signature", kind: "message", T: () => Signature }, + { no: 2, name: "label", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "messages", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Message }, + ]); + } + create(value?: PartialMessage): PushManyRequest { + const message = { label: "", messages: [] }; + globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + if (value !== undefined) reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead( + reader: IBinaryReader, + length: number, + options: BinaryReadOptions, + target?: PushManyRequest + ): PushManyRequest { + let message = target ?? this.create(), + end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* ecsrelay.Signature signature */ 1: + message.signature = Signature.internalBinaryRead(reader, reader.uint32(), options, message.signature); break; case /* string label */ 2: message.label = reader.string(); @@ -363,10 +495,10 @@ class PushRequest$Type extends MessageType { } return message; } - internalBinaryWrite(message: PushRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* ecsrelay.Identity identity = 1; */ - if (message.identity) - Identity.internalBinaryWrite(message.identity, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + internalBinaryWrite(message: PushManyRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* ecsrelay.Signature signature = 1; */ + if (message.signature) + Signature.internalBinaryWrite(message.signature, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); /* string label = 2; */ if (message.label !== "") writer.tag(2, WireType.LengthDelimited).string(message.label); /* repeated ecsrelay.Message messages = 3; */ @@ -378,9 +510,9 @@ class PushRequest$Type extends MessageType { } } /** - * @generated MessageType for protobuf message ecsrelay.PushRequest + * @generated MessageType for protobuf message ecsrelay.PushManyRequest */ -export const PushRequest = new PushRequest$Type(); +export const PushManyRequest = new PushManyRequest$Type(); // @generated message type with reflection information, may provide speed optimized methods class PushResponse$Type extends MessageType { constructor() { @@ -498,13 +630,14 @@ export const CountIdentitiesResponse = new CountIdentitiesResponse$Type(); * @generated ServiceType for protobuf service ecsrelay.ECSRelayService */ export const ECSRelayService = new ServiceType("ecsrelay.ECSRelayService", [ - { name: "Authenticate", options: {}, I: Identity, O: Identity }, - { name: "Revoke", options: {}, I: Identity, O: Identity }, - { name: "Ping", options: {}, I: Identity, O: Identity }, + { name: "Authenticate", options: {}, I: Signature, O: Identity }, + { name: "Revoke", options: {}, I: Signature, O: Identity }, + { name: "Ping", options: {}, I: Signature, O: Identity }, { name: "CountAuthenticated", options: {}, I: CountIdentitiesRequest, O: CountIdentitiesResponse }, { name: "CountConnected", options: {}, I: CountIdentitiesRequest, O: CountIdentitiesResponse }, { name: "Subscribe", options: {}, I: SubscriptionRequest, O: Subscription }, { name: "Unsubscribe", options: {}, I: SubscriptionRequest, O: Subscription }, - { name: "OpenStream", serverStreaming: true, options: {}, I: Identity, O: Message }, + { name: "OpenStream", serverStreaming: true, options: {}, I: Signature, O: Message }, { name: "Push", options: {}, I: PushRequest, O: PushResponse }, + { name: "PushMany", options: {}, I: PushManyRequest, O: PushResponse }, ]); diff --git a/yarn.lock b/yarn.lock index 8a96f9ba05..5aaf935642 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6243,7 +6243,7 @@ callsites@^2.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" integrity sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ== -callsites@^3.0.0: +callsites@^3.0.0, callsites@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== @@ -7321,7 +7321,7 @@ debug@2.6.9, debug@^2.6.0, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -10313,6 +10313,11 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== +is-observable@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-2.1.0.tgz#5c8d733a0b201c80dff7bb7c0df58c6a255c7c69" + integrity sha512-DailKdLb0WU+xX8K5w7VsJhapwHLZ9jjmazqCJq4X12CTgqq73TKnbRcnSLuXYPOoLQgV5IrD7ePiX/h1vnkBw== + is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -12986,6 +12991,11 @@ obliterator@^2.0.0: resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== +observable-fns@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/observable-fns/-/observable-fns-0.6.1.tgz#636eae4fdd1132e88c0faf38d33658cc79d87e37" + integrity sha512-9gRK4+sRWzeN6AOewNBTLXir7Zl/i3GB6Yl26gK4flxz8BXVpD3kt8amREmWNb0mxYOGDotvE5a4N+PtGGKdkg== + obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" @@ -16443,6 +16453,18 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +threads@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/threads/-/threads-1.7.0.tgz#d9e9627bfc1ef22ada3b733c2e7558bbe78e589c" + integrity sha512-Mx5NBSHX3sQYR6iI9VYbgHKBLisyB+xROCBGjjWm1O9wb9vfLxdaGtmT/KCjUqMsSNW6nERzCW3T6H43LqjDZQ== + dependencies: + callsites "^3.1.0" + debug "^4.2.0" + is-observable "^2.1.0" + observable-fns "^0.6.1" + optionalDependencies: + tiny-worker ">= 2" + throat@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375" @@ -16483,6 +16505,13 @@ tiny-decoders@^6.0.1: resolved "https://registry.yarnpkg.com/tiny-decoders/-/tiny-decoders-6.0.1.tgz#e296333ec32dd007740e8dc6d45cad980883011f" integrity sha512-dhL3vj2ge2jRKBHwKXL4w1BzjzjUBJoxsgzsLrCDhtq0CCKt2XXFfCQSEnttWSbqFAzwFfyIae+YR7Moab6w0w== +"tiny-worker@>= 2": + version "2.3.0" + resolved "https://registry.yarnpkg.com/tiny-worker/-/tiny-worker-2.3.0.tgz#715ae34304c757a9af573ae9a8e3967177e6011e" + integrity sha512-pJ70wq5EAqTAEl9IkGzA+fN0836rycEuz2Cn6yeZ6FRzlVS5IDOkFHpIoEsksPRQV34GDqXm65+OlnZqUSyK2g== + dependencies: + esm "^3.2.25" + tmp@0.0.33, tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"