@latticexyz/services 1.2.0 → 1.4.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.
- package/bin/ecs-relay +0 -0
- package/bin/ecs-snapshot +0 -0
- package/bin/ecs-stream +0 -0
- package/bin/faucet +0 -0
- package/package.json +2 -2
- package/protobuf/go/ecs-relay/ecs-relay.pb.go +301 -146
- package/protobuf/go/ecs-relay/ecs-relay_grpc.pb.go +63 -23
- package/protobuf/go/faucet/faucet.pb.go +196 -128
- package/protobuf/go/faucet/faucet_grpc.pb.go +50 -14
- package/protobuf/ts/ecs-relay/ecs-relay.client.ts +43 -21
- package/protobuf/ts/ecs-relay/ecs-relay.ts +178 -45
- package/protobuf/ts/faucet/faucet.client.ts +27 -11
- package/protobuf/ts/faucet/faucet.ts +85 -24
|
@@ -22,15 +22,18 @@ const _ = grpc.SupportPackageIsVersion7
|
|
|
22
22
|
//
|
|
23
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
24
|
type ECSRelayServiceClient interface {
|
|
25
|
-
Authenticate(ctx context.Context, in *
|
|
26
|
-
Revoke(ctx context.Context, in *
|
|
27
|
-
Ping(ctx context.Context, in *
|
|
25
|
+
Authenticate(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error)
|
|
26
|
+
Revoke(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error)
|
|
27
|
+
Ping(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error)
|
|
28
28
|
CountAuthenticated(ctx context.Context, in *CountIdentitiesRequest, opts ...grpc.CallOption) (*CountIdentitiesResponse, error)
|
|
29
29
|
CountConnected(ctx context.Context, in *CountIdentitiesRequest, opts ...grpc.CallOption) (*CountIdentitiesResponse, error)
|
|
30
30
|
Subscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error)
|
|
31
31
|
Unsubscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (*Subscription, error)
|
|
32
|
-
OpenStream(ctx context.Context, in *
|
|
32
|
+
OpenStream(ctx context.Context, in *Signature, opts ...grpc.CallOption) (ECSRelayService_OpenStreamClient, error)
|
|
33
|
+
// Push a single message to be relayed.
|
|
33
34
|
Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error)
|
|
35
|
+
// Push a series of messages to be relayed.
|
|
36
|
+
PushMany(ctx context.Context, in *PushManyRequest, opts ...grpc.CallOption) (*PushResponse, error)
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
type eCSRelayServiceClient struct {
|
|
@@ -41,7 +44,7 @@ func NewECSRelayServiceClient(cc grpc.ClientConnInterface) ECSRelayServiceClient
|
|
|
41
44
|
return &eCSRelayServiceClient{cc}
|
|
42
45
|
}
|
|
43
46
|
|
|
44
|
-
func (c *eCSRelayServiceClient) Authenticate(ctx context.Context, in *
|
|
47
|
+
func (c *eCSRelayServiceClient) Authenticate(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error) {
|
|
45
48
|
out := new(Identity)
|
|
46
49
|
err := c.cc.Invoke(ctx, "/ecsrelay.ECSRelayService/Authenticate", in, out, opts...)
|
|
47
50
|
if err != nil {
|
|
@@ -50,7 +53,7 @@ func (c *eCSRelayServiceClient) Authenticate(ctx context.Context, in *Identity,
|
|
|
50
53
|
return out, nil
|
|
51
54
|
}
|
|
52
55
|
|
|
53
|
-
func (c *eCSRelayServiceClient) Revoke(ctx context.Context, in *
|
|
56
|
+
func (c *eCSRelayServiceClient) Revoke(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error) {
|
|
54
57
|
out := new(Identity)
|
|
55
58
|
err := c.cc.Invoke(ctx, "/ecsrelay.ECSRelayService/Revoke", in, out, opts...)
|
|
56
59
|
if err != nil {
|
|
@@ -59,7 +62,7 @@ func (c *eCSRelayServiceClient) Revoke(ctx context.Context, in *Identity, opts .
|
|
|
59
62
|
return out, nil
|
|
60
63
|
}
|
|
61
64
|
|
|
62
|
-
func (c *eCSRelayServiceClient) Ping(ctx context.Context, in *
|
|
65
|
+
func (c *eCSRelayServiceClient) Ping(ctx context.Context, in *Signature, opts ...grpc.CallOption) (*Identity, error) {
|
|
63
66
|
out := new(Identity)
|
|
64
67
|
err := c.cc.Invoke(ctx, "/ecsrelay.ECSRelayService/Ping", in, out, opts...)
|
|
65
68
|
if err != nil {
|
|
@@ -104,7 +107,7 @@ func (c *eCSRelayServiceClient) Unsubscribe(ctx context.Context, in *Subscriptio
|
|
|
104
107
|
return out, nil
|
|
105
108
|
}
|
|
106
109
|
|
|
107
|
-
func (c *eCSRelayServiceClient) OpenStream(ctx context.Context, in *
|
|
110
|
+
func (c *eCSRelayServiceClient) OpenStream(ctx context.Context, in *Signature, opts ...grpc.CallOption) (ECSRelayService_OpenStreamClient, error) {
|
|
108
111
|
stream, err := c.cc.NewStream(ctx, &ECSRelayService_ServiceDesc.Streams[0], "/ecsrelay.ECSRelayService/OpenStream", opts...)
|
|
109
112
|
if err != nil {
|
|
110
113
|
return nil, err
|
|
@@ -145,19 +148,31 @@ func (c *eCSRelayServiceClient) Push(ctx context.Context, in *PushRequest, opts
|
|
|
145
148
|
return out, nil
|
|
146
149
|
}
|
|
147
150
|
|
|
151
|
+
func (c *eCSRelayServiceClient) PushMany(ctx context.Context, in *PushManyRequest, opts ...grpc.CallOption) (*PushResponse, error) {
|
|
152
|
+
out := new(PushResponse)
|
|
153
|
+
err := c.cc.Invoke(ctx, "/ecsrelay.ECSRelayService/PushMany", in, out, opts...)
|
|
154
|
+
if err != nil {
|
|
155
|
+
return nil, err
|
|
156
|
+
}
|
|
157
|
+
return out, nil
|
|
158
|
+
}
|
|
159
|
+
|
|
148
160
|
// ECSRelayServiceServer is the server API for ECSRelayService service.
|
|
149
161
|
// All implementations must embed UnimplementedECSRelayServiceServer
|
|
150
162
|
// for forward compatibility
|
|
151
163
|
type ECSRelayServiceServer interface {
|
|
152
|
-
Authenticate(context.Context, *
|
|
153
|
-
Revoke(context.Context, *
|
|
154
|
-
Ping(context.Context, *
|
|
164
|
+
Authenticate(context.Context, *Signature) (*Identity, error)
|
|
165
|
+
Revoke(context.Context, *Signature) (*Identity, error)
|
|
166
|
+
Ping(context.Context, *Signature) (*Identity, error)
|
|
155
167
|
CountAuthenticated(context.Context, *CountIdentitiesRequest) (*CountIdentitiesResponse, error)
|
|
156
168
|
CountConnected(context.Context, *CountIdentitiesRequest) (*CountIdentitiesResponse, error)
|
|
157
169
|
Subscribe(context.Context, *SubscriptionRequest) (*Subscription, error)
|
|
158
170
|
Unsubscribe(context.Context, *SubscriptionRequest) (*Subscription, error)
|
|
159
|
-
OpenStream(*
|
|
171
|
+
OpenStream(*Signature, ECSRelayService_OpenStreamServer) error
|
|
172
|
+
// Push a single message to be relayed.
|
|
160
173
|
Push(context.Context, *PushRequest) (*PushResponse, error)
|
|
174
|
+
// Push a series of messages to be relayed.
|
|
175
|
+
PushMany(context.Context, *PushManyRequest) (*PushResponse, error)
|
|
161
176
|
mustEmbedUnimplementedECSRelayServiceServer()
|
|
162
177
|
}
|
|
163
178
|
|
|
@@ -165,13 +180,13 @@ type ECSRelayServiceServer interface {
|
|
|
165
180
|
type UnimplementedECSRelayServiceServer struct {
|
|
166
181
|
}
|
|
167
182
|
|
|
168
|
-
func (UnimplementedECSRelayServiceServer) Authenticate(context.Context, *
|
|
183
|
+
func (UnimplementedECSRelayServiceServer) Authenticate(context.Context, *Signature) (*Identity, error) {
|
|
169
184
|
return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented")
|
|
170
185
|
}
|
|
171
|
-
func (UnimplementedECSRelayServiceServer) Revoke(context.Context, *
|
|
186
|
+
func (UnimplementedECSRelayServiceServer) Revoke(context.Context, *Signature) (*Identity, error) {
|
|
172
187
|
return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented")
|
|
173
188
|
}
|
|
174
|
-
func (UnimplementedECSRelayServiceServer) Ping(context.Context, *
|
|
189
|
+
func (UnimplementedECSRelayServiceServer) Ping(context.Context, *Signature) (*Identity, error) {
|
|
175
190
|
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
|
|
176
191
|
}
|
|
177
192
|
func (UnimplementedECSRelayServiceServer) CountAuthenticated(context.Context, *CountIdentitiesRequest) (*CountIdentitiesResponse, error) {
|
|
@@ -186,12 +201,15 @@ func (UnimplementedECSRelayServiceServer) Subscribe(context.Context, *Subscripti
|
|
|
186
201
|
func (UnimplementedECSRelayServiceServer) Unsubscribe(context.Context, *SubscriptionRequest) (*Subscription, error) {
|
|
187
202
|
return nil, status.Errorf(codes.Unimplemented, "method Unsubscribe not implemented")
|
|
188
203
|
}
|
|
189
|
-
func (UnimplementedECSRelayServiceServer) OpenStream(*
|
|
204
|
+
func (UnimplementedECSRelayServiceServer) OpenStream(*Signature, ECSRelayService_OpenStreamServer) error {
|
|
190
205
|
return status.Errorf(codes.Unimplemented, "method OpenStream not implemented")
|
|
191
206
|
}
|
|
192
207
|
func (UnimplementedECSRelayServiceServer) Push(context.Context, *PushRequest) (*PushResponse, error) {
|
|
193
208
|
return nil, status.Errorf(codes.Unimplemented, "method Push not implemented")
|
|
194
209
|
}
|
|
210
|
+
func (UnimplementedECSRelayServiceServer) PushMany(context.Context, *PushManyRequest) (*PushResponse, error) {
|
|
211
|
+
return nil, status.Errorf(codes.Unimplemented, "method PushMany not implemented")
|
|
212
|
+
}
|
|
195
213
|
func (UnimplementedECSRelayServiceServer) mustEmbedUnimplementedECSRelayServiceServer() {}
|
|
196
214
|
|
|
197
215
|
// UnsafeECSRelayServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
@@ -206,7 +224,7 @@ func RegisterECSRelayServiceServer(s grpc.ServiceRegistrar, srv ECSRelayServiceS
|
|
|
206
224
|
}
|
|
207
225
|
|
|
208
226
|
func _ECSRelayService_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
209
|
-
in := new(
|
|
227
|
+
in := new(Signature)
|
|
210
228
|
if err := dec(in); err != nil {
|
|
211
229
|
return nil, err
|
|
212
230
|
}
|
|
@@ -218,13 +236,13 @@ func _ECSRelayService_Authenticate_Handler(srv interface{}, ctx context.Context,
|
|
|
218
236
|
FullMethod: "/ecsrelay.ECSRelayService/Authenticate",
|
|
219
237
|
}
|
|
220
238
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
221
|
-
return srv.(ECSRelayServiceServer).Authenticate(ctx, req.(*
|
|
239
|
+
return srv.(ECSRelayServiceServer).Authenticate(ctx, req.(*Signature))
|
|
222
240
|
}
|
|
223
241
|
return interceptor(ctx, in, info, handler)
|
|
224
242
|
}
|
|
225
243
|
|
|
226
244
|
func _ECSRelayService_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
227
|
-
in := new(
|
|
245
|
+
in := new(Signature)
|
|
228
246
|
if err := dec(in); err != nil {
|
|
229
247
|
return nil, err
|
|
230
248
|
}
|
|
@@ -236,13 +254,13 @@ func _ECSRelayService_Revoke_Handler(srv interface{}, ctx context.Context, dec f
|
|
|
236
254
|
FullMethod: "/ecsrelay.ECSRelayService/Revoke",
|
|
237
255
|
}
|
|
238
256
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
239
|
-
return srv.(ECSRelayServiceServer).Revoke(ctx, req.(*
|
|
257
|
+
return srv.(ECSRelayServiceServer).Revoke(ctx, req.(*Signature))
|
|
240
258
|
}
|
|
241
259
|
return interceptor(ctx, in, info, handler)
|
|
242
260
|
}
|
|
243
261
|
|
|
244
262
|
func _ECSRelayService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
245
|
-
in := new(
|
|
263
|
+
in := new(Signature)
|
|
246
264
|
if err := dec(in); err != nil {
|
|
247
265
|
return nil, err
|
|
248
266
|
}
|
|
@@ -254,7 +272,7 @@ func _ECSRelayService_Ping_Handler(srv interface{}, ctx context.Context, dec fun
|
|
|
254
272
|
FullMethod: "/ecsrelay.ECSRelayService/Ping",
|
|
255
273
|
}
|
|
256
274
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
257
|
-
return srv.(ECSRelayServiceServer).Ping(ctx, req.(*
|
|
275
|
+
return srv.(ECSRelayServiceServer).Ping(ctx, req.(*Signature))
|
|
258
276
|
}
|
|
259
277
|
return interceptor(ctx, in, info, handler)
|
|
260
278
|
}
|
|
@@ -332,7 +350,7 @@ func _ECSRelayService_Unsubscribe_Handler(srv interface{}, ctx context.Context,
|
|
|
332
350
|
}
|
|
333
351
|
|
|
334
352
|
func _ECSRelayService_OpenStream_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
335
|
-
m := new(
|
|
353
|
+
m := new(Signature)
|
|
336
354
|
if err := stream.RecvMsg(m); err != nil {
|
|
337
355
|
return err
|
|
338
356
|
}
|
|
@@ -370,6 +388,24 @@ func _ECSRelayService_Push_Handler(srv interface{}, ctx context.Context, dec fun
|
|
|
370
388
|
return interceptor(ctx, in, info, handler)
|
|
371
389
|
}
|
|
372
390
|
|
|
391
|
+
func _ECSRelayService_PushMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
392
|
+
in := new(PushManyRequest)
|
|
393
|
+
if err := dec(in); err != nil {
|
|
394
|
+
return nil, err
|
|
395
|
+
}
|
|
396
|
+
if interceptor == nil {
|
|
397
|
+
return srv.(ECSRelayServiceServer).PushMany(ctx, in)
|
|
398
|
+
}
|
|
399
|
+
info := &grpc.UnaryServerInfo{
|
|
400
|
+
Server: srv,
|
|
401
|
+
FullMethod: "/ecsrelay.ECSRelayService/PushMany",
|
|
402
|
+
}
|
|
403
|
+
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
404
|
+
return srv.(ECSRelayServiceServer).PushMany(ctx, req.(*PushManyRequest))
|
|
405
|
+
}
|
|
406
|
+
return interceptor(ctx, in, info, handler)
|
|
407
|
+
}
|
|
408
|
+
|
|
373
409
|
// ECSRelayService_ServiceDesc is the grpc.ServiceDesc for ECSRelayService service.
|
|
374
410
|
// It's only intended for direct use with grpc.RegisterService,
|
|
375
411
|
// and not to be introspected or modified (even as a copy)
|
|
@@ -409,6 +445,10 @@ var ECSRelayService_ServiceDesc = grpc.ServiceDesc{
|
|
|
409
445
|
MethodName: "Push",
|
|
410
446
|
Handler: _ECSRelayService_Push_Handler,
|
|
411
447
|
},
|
|
448
|
+
{
|
|
449
|
+
MethodName: "PushMany",
|
|
450
|
+
Handler: _ECSRelayService_PushMany_Handler,
|
|
451
|
+
},
|
|
412
452
|
},
|
|
413
453
|
Streams: []grpc.StreamDesc{
|
|
414
454
|
{
|