@latticexyz/services 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,213 @@
1
+ // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2
+ // versions:
3
+ // - protoc-gen-go-grpc v1.2.0
4
+ // - protoc v3.21.3
5
+ // source: proto/faucet.proto
6
+
7
+ package faucet
8
+
9
+ import (
10
+ context "context"
11
+ grpc "google.golang.org/grpc"
12
+ codes "google.golang.org/grpc/codes"
13
+ status "google.golang.org/grpc/status"
14
+ )
15
+
16
+ // This is a compile-time assertion to ensure that this generated file
17
+ // is compatible with the grpc package it is being compiled against.
18
+ // Requires gRPC-Go v1.32.0 or later.
19
+ const _ = grpc.SupportPackageIsVersion7
20
+
21
+ // FaucetServiceClient is the client API for FaucetService service.
22
+ //
23
+ // 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.
24
+ type FaucetServiceClient interface {
25
+ VerifyTweet(ctx context.Context, in *VerifyTweetRequest, opts ...grpc.CallOption) (*VerifyTweetResponse, error)
26
+ GetLinkedTwitters(ctx context.Context, in *GetLinkedTwittersRequest, opts ...grpc.CallOption) (*GetLinkedTwittersResponse, error)
27
+ GetLinkedTwitterForAddress(ctx context.Context, in *LinkedTwitterForAddressRequest, opts ...grpc.CallOption) (*LinkedTwitterForAddressResponse, error)
28
+ GetLinkedAddressForTwitter(ctx context.Context, in *LinkedAddressForTwitterRequest, opts ...grpc.CallOption) (*LinkedAddressForTwitterResponse, error)
29
+ }
30
+
31
+ type faucetServiceClient struct {
32
+ cc grpc.ClientConnInterface
33
+ }
34
+
35
+ func NewFaucetServiceClient(cc grpc.ClientConnInterface) FaucetServiceClient {
36
+ return &faucetServiceClient{cc}
37
+ }
38
+
39
+ func (c *faucetServiceClient) VerifyTweet(ctx context.Context, in *VerifyTweetRequest, opts ...grpc.CallOption) (*VerifyTweetResponse, error) {
40
+ out := new(VerifyTweetResponse)
41
+ err := c.cc.Invoke(ctx, "/faucet.FaucetService/VerifyTweet", in, out, opts...)
42
+ if err != nil {
43
+ return nil, err
44
+ }
45
+ return out, nil
46
+ }
47
+
48
+ func (c *faucetServiceClient) GetLinkedTwitters(ctx context.Context, in *GetLinkedTwittersRequest, opts ...grpc.CallOption) (*GetLinkedTwittersResponse, error) {
49
+ out := new(GetLinkedTwittersResponse)
50
+ err := c.cc.Invoke(ctx, "/faucet.FaucetService/GetLinkedTwitters", in, out, opts...)
51
+ if err != nil {
52
+ return nil, err
53
+ }
54
+ return out, nil
55
+ }
56
+
57
+ func (c *faucetServiceClient) GetLinkedTwitterForAddress(ctx context.Context, in *LinkedTwitterForAddressRequest, opts ...grpc.CallOption) (*LinkedTwitterForAddressResponse, error) {
58
+ out := new(LinkedTwitterForAddressResponse)
59
+ err := c.cc.Invoke(ctx, "/faucet.FaucetService/GetLinkedTwitterForAddress", in, out, opts...)
60
+ if err != nil {
61
+ return nil, err
62
+ }
63
+ return out, nil
64
+ }
65
+
66
+ func (c *faucetServiceClient) GetLinkedAddressForTwitter(ctx context.Context, in *LinkedAddressForTwitterRequest, opts ...grpc.CallOption) (*LinkedAddressForTwitterResponse, error) {
67
+ out := new(LinkedAddressForTwitterResponse)
68
+ err := c.cc.Invoke(ctx, "/faucet.FaucetService/GetLinkedAddressForTwitter", in, out, opts...)
69
+ if err != nil {
70
+ return nil, err
71
+ }
72
+ return out, nil
73
+ }
74
+
75
+ // FaucetServiceServer is the server API for FaucetService service.
76
+ // All implementations must embed UnimplementedFaucetServiceServer
77
+ // for forward compatibility
78
+ type FaucetServiceServer interface {
79
+ VerifyTweet(context.Context, *VerifyTweetRequest) (*VerifyTweetResponse, error)
80
+ GetLinkedTwitters(context.Context, *GetLinkedTwittersRequest) (*GetLinkedTwittersResponse, error)
81
+ GetLinkedTwitterForAddress(context.Context, *LinkedTwitterForAddressRequest) (*LinkedTwitterForAddressResponse, error)
82
+ GetLinkedAddressForTwitter(context.Context, *LinkedAddressForTwitterRequest) (*LinkedAddressForTwitterResponse, error)
83
+ mustEmbedUnimplementedFaucetServiceServer()
84
+ }
85
+
86
+ // UnimplementedFaucetServiceServer must be embedded to have forward compatible implementations.
87
+ type UnimplementedFaucetServiceServer struct {
88
+ }
89
+
90
+ func (UnimplementedFaucetServiceServer) VerifyTweet(context.Context, *VerifyTweetRequest) (*VerifyTweetResponse, error) {
91
+ return nil, status.Errorf(codes.Unimplemented, "method VerifyTweet not implemented")
92
+ }
93
+ func (UnimplementedFaucetServiceServer) GetLinkedTwitters(context.Context, *GetLinkedTwittersRequest) (*GetLinkedTwittersResponse, error) {
94
+ return nil, status.Errorf(codes.Unimplemented, "method GetLinkedTwitters not implemented")
95
+ }
96
+ func (UnimplementedFaucetServiceServer) GetLinkedTwitterForAddress(context.Context, *LinkedTwitterForAddressRequest) (*LinkedTwitterForAddressResponse, error) {
97
+ return nil, status.Errorf(codes.Unimplemented, "method GetLinkedTwitterForAddress not implemented")
98
+ }
99
+ func (UnimplementedFaucetServiceServer) GetLinkedAddressForTwitter(context.Context, *LinkedAddressForTwitterRequest) (*LinkedAddressForTwitterResponse, error) {
100
+ return nil, status.Errorf(codes.Unimplemented, "method GetLinkedAddressForTwitter not implemented")
101
+ }
102
+ func (UnimplementedFaucetServiceServer) mustEmbedUnimplementedFaucetServiceServer() {}
103
+
104
+ // UnsafeFaucetServiceServer may be embedded to opt out of forward compatibility for this service.
105
+ // Use of this interface is not recommended, as added methods to FaucetServiceServer will
106
+ // result in compilation errors.
107
+ type UnsafeFaucetServiceServer interface {
108
+ mustEmbedUnimplementedFaucetServiceServer()
109
+ }
110
+
111
+ func RegisterFaucetServiceServer(s grpc.ServiceRegistrar, srv FaucetServiceServer) {
112
+ s.RegisterService(&FaucetService_ServiceDesc, srv)
113
+ }
114
+
115
+ func _FaucetService_VerifyTweet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
116
+ in := new(VerifyTweetRequest)
117
+ if err := dec(in); err != nil {
118
+ return nil, err
119
+ }
120
+ if interceptor == nil {
121
+ return srv.(FaucetServiceServer).VerifyTweet(ctx, in)
122
+ }
123
+ info := &grpc.UnaryServerInfo{
124
+ Server: srv,
125
+ FullMethod: "/faucet.FaucetService/VerifyTweet",
126
+ }
127
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
128
+ return srv.(FaucetServiceServer).VerifyTweet(ctx, req.(*VerifyTweetRequest))
129
+ }
130
+ return interceptor(ctx, in, info, handler)
131
+ }
132
+
133
+ func _FaucetService_GetLinkedTwitters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
134
+ in := new(GetLinkedTwittersRequest)
135
+ if err := dec(in); err != nil {
136
+ return nil, err
137
+ }
138
+ if interceptor == nil {
139
+ return srv.(FaucetServiceServer).GetLinkedTwitters(ctx, in)
140
+ }
141
+ info := &grpc.UnaryServerInfo{
142
+ Server: srv,
143
+ FullMethod: "/faucet.FaucetService/GetLinkedTwitters",
144
+ }
145
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
146
+ return srv.(FaucetServiceServer).GetLinkedTwitters(ctx, req.(*GetLinkedTwittersRequest))
147
+ }
148
+ return interceptor(ctx, in, info, handler)
149
+ }
150
+
151
+ func _FaucetService_GetLinkedTwitterForAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
152
+ in := new(LinkedTwitterForAddressRequest)
153
+ if err := dec(in); err != nil {
154
+ return nil, err
155
+ }
156
+ if interceptor == nil {
157
+ return srv.(FaucetServiceServer).GetLinkedTwitterForAddress(ctx, in)
158
+ }
159
+ info := &grpc.UnaryServerInfo{
160
+ Server: srv,
161
+ FullMethod: "/faucet.FaucetService/GetLinkedTwitterForAddress",
162
+ }
163
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
164
+ return srv.(FaucetServiceServer).GetLinkedTwitterForAddress(ctx, req.(*LinkedTwitterForAddressRequest))
165
+ }
166
+ return interceptor(ctx, in, info, handler)
167
+ }
168
+
169
+ func _FaucetService_GetLinkedAddressForTwitter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
170
+ in := new(LinkedAddressForTwitterRequest)
171
+ if err := dec(in); err != nil {
172
+ return nil, err
173
+ }
174
+ if interceptor == nil {
175
+ return srv.(FaucetServiceServer).GetLinkedAddressForTwitter(ctx, in)
176
+ }
177
+ info := &grpc.UnaryServerInfo{
178
+ Server: srv,
179
+ FullMethod: "/faucet.FaucetService/GetLinkedAddressForTwitter",
180
+ }
181
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
182
+ return srv.(FaucetServiceServer).GetLinkedAddressForTwitter(ctx, req.(*LinkedAddressForTwitterRequest))
183
+ }
184
+ return interceptor(ctx, in, info, handler)
185
+ }
186
+
187
+ // FaucetService_ServiceDesc is the grpc.ServiceDesc for FaucetService service.
188
+ // It's only intended for direct use with grpc.RegisterService,
189
+ // and not to be introspected or modified (even as a copy)
190
+ var FaucetService_ServiceDesc = grpc.ServiceDesc{
191
+ ServiceName: "faucet.FaucetService",
192
+ HandlerType: (*FaucetServiceServer)(nil),
193
+ Methods: []grpc.MethodDesc{
194
+ {
195
+ MethodName: "VerifyTweet",
196
+ Handler: _FaucetService_VerifyTweet_Handler,
197
+ },
198
+ {
199
+ MethodName: "GetLinkedTwitters",
200
+ Handler: _FaucetService_GetLinkedTwitters_Handler,
201
+ },
202
+ {
203
+ MethodName: "GetLinkedTwitterForAddress",
204
+ Handler: _FaucetService_GetLinkedTwitterForAddress_Handler,
205
+ },
206
+ {
207
+ MethodName: "GetLinkedAddressForTwitter",
208
+ Handler: _FaucetService_GetLinkedAddressForTwitter_Handler,
209
+ },
210
+ },
211
+ Streams: []grpc.StreamDesc{},
212
+ Metadata: "proto/faucet.proto",
213
+ }
@@ -0,0 +1,169 @@
1
+ /* eslint-disable */
2
+ // @generated by protobuf-ts 2.8.1 with parameter eslint_disable
3
+ // @generated from protobuf file "ecs-relay.proto" (package "ecsrelay", syntax proto3)
4
+ // tslint:disable
5
+ import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
6
+ import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
7
+ import { ECSRelayService } from "./ecs-relay";
8
+ import type { PushResponse } from "./ecs-relay";
9
+ import type { PushRequest } from "./ecs-relay";
10
+ import type { Message } from "./ecs-relay";
11
+ import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
12
+ import type { Subscription } from "./ecs-relay";
13
+ import type { SubscriptionRequest } from "./ecs-relay";
14
+ import type { CountIdentitiesResponse } from "./ecs-relay";
15
+ import type { CountIdentitiesRequest } from "./ecs-relay";
16
+ import { stackIntercept } from "@protobuf-ts/runtime-rpc";
17
+ import type { Identity } from "./ecs-relay";
18
+ import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
19
+ import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
20
+ /**
21
+ * The Relay Service definition.
22
+ *
23
+ * @generated from protobuf service ecsrelay.ECSRelayService
24
+ */
25
+ export interface IECSRelayServiceClient {
26
+ /**
27
+ * @generated from protobuf rpc: Authenticate(ecsrelay.Identity) returns (ecsrelay.Identity);
28
+ */
29
+ authenticate(input: Identity, options?: RpcOptions): UnaryCall<Identity, Identity>;
30
+ /**
31
+ * @generated from protobuf rpc: Revoke(ecsrelay.Identity) returns (ecsrelay.Identity);
32
+ */
33
+ revoke(input: Identity, options?: RpcOptions): UnaryCall<Identity, Identity>;
34
+ /**
35
+ * @generated from protobuf rpc: Ping(ecsrelay.Identity) returns (ecsrelay.Identity);
36
+ */
37
+ ping(input: Identity, options?: RpcOptions): UnaryCall<Identity, Identity>;
38
+ /**
39
+ * @generated from protobuf rpc: CountAuthenticated(ecsrelay.CountIdentitiesRequest) returns (ecsrelay.CountIdentitiesResponse);
40
+ */
41
+ countAuthenticated(
42
+ input: CountIdentitiesRequest,
43
+ options?: RpcOptions
44
+ ): UnaryCall<CountIdentitiesRequest, CountIdentitiesResponse>;
45
+ /**
46
+ * @generated from protobuf rpc: CountConnected(ecsrelay.CountIdentitiesRequest) returns (ecsrelay.CountIdentitiesResponse);
47
+ */
48
+ countConnected(
49
+ input: CountIdentitiesRequest,
50
+ options?: RpcOptions
51
+ ): UnaryCall<CountIdentitiesRequest, CountIdentitiesResponse>;
52
+ /**
53
+ * @generated from protobuf rpc: Subscribe(ecsrelay.SubscriptionRequest) returns (ecsrelay.Subscription);
54
+ */
55
+ subscribe(input: SubscriptionRequest, options?: RpcOptions): UnaryCall<SubscriptionRequest, Subscription>;
56
+ /**
57
+ * @generated from protobuf rpc: Unsubscribe(ecsrelay.SubscriptionRequest) returns (ecsrelay.Subscription);
58
+ */
59
+ unsubscribe(input: SubscriptionRequest, options?: RpcOptions): UnaryCall<SubscriptionRequest, Subscription>;
60
+ /**
61
+ * @generated from protobuf rpc: OpenStream(ecsrelay.Identity) returns (stream ecsrelay.Message);
62
+ */
63
+ openStream(input: Identity, options?: RpcOptions): ServerStreamingCall<Identity, Message>;
64
+ /**
65
+ * @generated from protobuf rpc: Push(ecsrelay.PushRequest) returns (ecsrelay.PushResponse);
66
+ */
67
+ push(input: PushRequest, options?: RpcOptions): UnaryCall<PushRequest, PushResponse>;
68
+ }
69
+ /**
70
+ * The Relay Service definition.
71
+ *
72
+ * @generated from protobuf service ecsrelay.ECSRelayService
73
+ */
74
+ export class ECSRelayServiceClient implements IECSRelayServiceClient, ServiceInfo {
75
+ typeName = ECSRelayService.typeName;
76
+ methods = ECSRelayService.methods;
77
+ options = ECSRelayService.options;
78
+ constructor(private readonly _transport: RpcTransport) {}
79
+ /**
80
+ * @generated from protobuf rpc: Authenticate(ecsrelay.Identity) returns (ecsrelay.Identity);
81
+ */
82
+ authenticate(input: Identity, options?: RpcOptions): UnaryCall<Identity, Identity> {
83
+ const method = this.methods[0],
84
+ opt = this._transport.mergeOptions(options);
85
+ return stackIntercept<Identity, Identity>("unary", this._transport, method, opt, input);
86
+ }
87
+ /**
88
+ * @generated from protobuf rpc: Revoke(ecsrelay.Identity) returns (ecsrelay.Identity);
89
+ */
90
+ revoke(input: Identity, options?: RpcOptions): UnaryCall<Identity, Identity> {
91
+ const method = this.methods[1],
92
+ opt = this._transport.mergeOptions(options);
93
+ return stackIntercept<Identity, Identity>("unary", this._transport, method, opt, input);
94
+ }
95
+ /**
96
+ * @generated from protobuf rpc: Ping(ecsrelay.Identity) returns (ecsrelay.Identity);
97
+ */
98
+ ping(input: Identity, options?: RpcOptions): UnaryCall<Identity, Identity> {
99
+ const method = this.methods[2],
100
+ opt = this._transport.mergeOptions(options);
101
+ return stackIntercept<Identity, Identity>("unary", this._transport, method, opt, input);
102
+ }
103
+ /**
104
+ * @generated from protobuf rpc: CountAuthenticated(ecsrelay.CountIdentitiesRequest) returns (ecsrelay.CountIdentitiesResponse);
105
+ */
106
+ countAuthenticated(
107
+ input: CountIdentitiesRequest,
108
+ options?: RpcOptions
109
+ ): UnaryCall<CountIdentitiesRequest, CountIdentitiesResponse> {
110
+ const method = this.methods[3],
111
+ opt = this._transport.mergeOptions(options);
112
+ return stackIntercept<CountIdentitiesRequest, CountIdentitiesResponse>(
113
+ "unary",
114
+ this._transport,
115
+ method,
116
+ opt,
117
+ input
118
+ );
119
+ }
120
+ /**
121
+ * @generated from protobuf rpc: CountConnected(ecsrelay.CountIdentitiesRequest) returns (ecsrelay.CountIdentitiesResponse);
122
+ */
123
+ countConnected(
124
+ input: CountIdentitiesRequest,
125
+ options?: RpcOptions
126
+ ): UnaryCall<CountIdentitiesRequest, CountIdentitiesResponse> {
127
+ const method = this.methods[4],
128
+ opt = this._transport.mergeOptions(options);
129
+ return stackIntercept<CountIdentitiesRequest, CountIdentitiesResponse>(
130
+ "unary",
131
+ this._transport,
132
+ method,
133
+ opt,
134
+ input
135
+ );
136
+ }
137
+ /**
138
+ * @generated from protobuf rpc: Subscribe(ecsrelay.SubscriptionRequest) returns (ecsrelay.Subscription);
139
+ */
140
+ subscribe(input: SubscriptionRequest, options?: RpcOptions): UnaryCall<SubscriptionRequest, Subscription> {
141
+ const method = this.methods[5],
142
+ opt = this._transport.mergeOptions(options);
143
+ return stackIntercept<SubscriptionRequest, Subscription>("unary", this._transport, method, opt, input);
144
+ }
145
+ /**
146
+ * @generated from protobuf rpc: Unsubscribe(ecsrelay.SubscriptionRequest) returns (ecsrelay.Subscription);
147
+ */
148
+ unsubscribe(input: SubscriptionRequest, options?: RpcOptions): UnaryCall<SubscriptionRequest, Subscription> {
149
+ const method = this.methods[6],
150
+ opt = this._transport.mergeOptions(options);
151
+ return stackIntercept<SubscriptionRequest, Subscription>("unary", this._transport, method, opt, input);
152
+ }
153
+ /**
154
+ * @generated from protobuf rpc: OpenStream(ecsrelay.Identity) returns (stream ecsrelay.Message);
155
+ */
156
+ openStream(input: Identity, options?: RpcOptions): ServerStreamingCall<Identity, Message> {
157
+ const method = this.methods[7],
158
+ opt = this._transport.mergeOptions(options);
159
+ return stackIntercept<Identity, Message>("serverStreaming", this._transport, method, opt, input);
160
+ }
161
+ /**
162
+ * @generated from protobuf rpc: Push(ecsrelay.PushRequest) returns (ecsrelay.PushResponse);
163
+ */
164
+ push(input: PushRequest, options?: RpcOptions): UnaryCall<PushRequest, PushResponse> {
165
+ const method = this.methods[8],
166
+ opt = this._transport.mergeOptions(options);
167
+ return stackIntercept<PushRequest, PushResponse>("unary", this._transport, method, opt, input);
168
+ }
169
+ }