@latticexyz/services 1.3.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,7 +22,8 @@ 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 FaucetServiceClient interface {
|
|
25
|
-
|
|
25
|
+
DripDev(ctx context.Context, in *DripDevRequest, opts ...grpc.CallOption) (*DripResponse, error)
|
|
26
|
+
DripVerifyTweet(ctx context.Context, in *DripVerifyTweetRequest, opts ...grpc.CallOption) (*DripResponse, error)
|
|
26
27
|
GetLinkedTwitters(ctx context.Context, in *GetLinkedTwittersRequest, opts ...grpc.CallOption) (*GetLinkedTwittersResponse, error)
|
|
27
28
|
GetLinkedTwitterForAddress(ctx context.Context, in *LinkedTwitterForAddressRequest, opts ...grpc.CallOption) (*LinkedTwitterForAddressResponse, error)
|
|
28
29
|
GetLinkedAddressForTwitter(ctx context.Context, in *LinkedAddressForTwitterRequest, opts ...grpc.CallOption) (*LinkedAddressForTwitterResponse, error)
|
|
@@ -36,9 +37,18 @@ func NewFaucetServiceClient(cc grpc.ClientConnInterface) FaucetServiceClient {
|
|
|
36
37
|
return &faucetServiceClient{cc}
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
func (c *faucetServiceClient)
|
|
40
|
-
out := new(
|
|
41
|
-
err := c.cc.Invoke(ctx, "/faucet.FaucetService/
|
|
40
|
+
func (c *faucetServiceClient) DripDev(ctx context.Context, in *DripDevRequest, opts ...grpc.CallOption) (*DripResponse, error) {
|
|
41
|
+
out := new(DripResponse)
|
|
42
|
+
err := c.cc.Invoke(ctx, "/faucet.FaucetService/DripDev", in, out, opts...)
|
|
43
|
+
if err != nil {
|
|
44
|
+
return nil, err
|
|
45
|
+
}
|
|
46
|
+
return out, nil
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
func (c *faucetServiceClient) DripVerifyTweet(ctx context.Context, in *DripVerifyTweetRequest, opts ...grpc.CallOption) (*DripResponse, error) {
|
|
50
|
+
out := new(DripResponse)
|
|
51
|
+
err := c.cc.Invoke(ctx, "/faucet.FaucetService/DripVerifyTweet", in, out, opts...)
|
|
42
52
|
if err != nil {
|
|
43
53
|
return nil, err
|
|
44
54
|
}
|
|
@@ -76,7 +86,8 @@ func (c *faucetServiceClient) GetLinkedAddressForTwitter(ctx context.Context, in
|
|
|
76
86
|
// All implementations must embed UnimplementedFaucetServiceServer
|
|
77
87
|
// for forward compatibility
|
|
78
88
|
type FaucetServiceServer interface {
|
|
79
|
-
|
|
89
|
+
DripDev(context.Context, *DripDevRequest) (*DripResponse, error)
|
|
90
|
+
DripVerifyTweet(context.Context, *DripVerifyTweetRequest) (*DripResponse, error)
|
|
80
91
|
GetLinkedTwitters(context.Context, *GetLinkedTwittersRequest) (*GetLinkedTwittersResponse, error)
|
|
81
92
|
GetLinkedTwitterForAddress(context.Context, *LinkedTwitterForAddressRequest) (*LinkedTwitterForAddressResponse, error)
|
|
82
93
|
GetLinkedAddressForTwitter(context.Context, *LinkedAddressForTwitterRequest) (*LinkedAddressForTwitterResponse, error)
|
|
@@ -87,8 +98,11 @@ type FaucetServiceServer interface {
|
|
|
87
98
|
type UnimplementedFaucetServiceServer struct {
|
|
88
99
|
}
|
|
89
100
|
|
|
90
|
-
func (UnimplementedFaucetServiceServer)
|
|
91
|
-
return nil, status.Errorf(codes.Unimplemented, "method
|
|
101
|
+
func (UnimplementedFaucetServiceServer) DripDev(context.Context, *DripDevRequest) (*DripResponse, error) {
|
|
102
|
+
return nil, status.Errorf(codes.Unimplemented, "method DripDev not implemented")
|
|
103
|
+
}
|
|
104
|
+
func (UnimplementedFaucetServiceServer) DripVerifyTweet(context.Context, *DripVerifyTweetRequest) (*DripResponse, error) {
|
|
105
|
+
return nil, status.Errorf(codes.Unimplemented, "method DripVerifyTweet not implemented")
|
|
92
106
|
}
|
|
93
107
|
func (UnimplementedFaucetServiceServer) GetLinkedTwitters(context.Context, *GetLinkedTwittersRequest) (*GetLinkedTwittersResponse, error) {
|
|
94
108
|
return nil, status.Errorf(codes.Unimplemented, "method GetLinkedTwitters not implemented")
|
|
@@ -112,20 +126,38 @@ func RegisterFaucetServiceServer(s grpc.ServiceRegistrar, srv FaucetServiceServe
|
|
|
112
126
|
s.RegisterService(&FaucetService_ServiceDesc, srv)
|
|
113
127
|
}
|
|
114
128
|
|
|
115
|
-
func
|
|
116
|
-
in := new(
|
|
129
|
+
func _FaucetService_DripDev_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
130
|
+
in := new(DripDevRequest)
|
|
131
|
+
if err := dec(in); err != nil {
|
|
132
|
+
return nil, err
|
|
133
|
+
}
|
|
134
|
+
if interceptor == nil {
|
|
135
|
+
return srv.(FaucetServiceServer).DripDev(ctx, in)
|
|
136
|
+
}
|
|
137
|
+
info := &grpc.UnaryServerInfo{
|
|
138
|
+
Server: srv,
|
|
139
|
+
FullMethod: "/faucet.FaucetService/DripDev",
|
|
140
|
+
}
|
|
141
|
+
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
142
|
+
return srv.(FaucetServiceServer).DripDev(ctx, req.(*DripDevRequest))
|
|
143
|
+
}
|
|
144
|
+
return interceptor(ctx, in, info, handler)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
func _FaucetService_DripVerifyTweet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
148
|
+
in := new(DripVerifyTweetRequest)
|
|
117
149
|
if err := dec(in); err != nil {
|
|
118
150
|
return nil, err
|
|
119
151
|
}
|
|
120
152
|
if interceptor == nil {
|
|
121
|
-
return srv.(FaucetServiceServer).
|
|
153
|
+
return srv.(FaucetServiceServer).DripVerifyTweet(ctx, in)
|
|
122
154
|
}
|
|
123
155
|
info := &grpc.UnaryServerInfo{
|
|
124
156
|
Server: srv,
|
|
125
|
-
FullMethod: "/faucet.FaucetService/
|
|
157
|
+
FullMethod: "/faucet.FaucetService/DripVerifyTweet",
|
|
126
158
|
}
|
|
127
159
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
128
|
-
return srv.(FaucetServiceServer).
|
|
160
|
+
return srv.(FaucetServiceServer).DripVerifyTweet(ctx, req.(*DripVerifyTweetRequest))
|
|
129
161
|
}
|
|
130
162
|
return interceptor(ctx, in, info, handler)
|
|
131
163
|
}
|
|
@@ -192,8 +224,12 @@ var FaucetService_ServiceDesc = grpc.ServiceDesc{
|
|
|
192
224
|
HandlerType: (*FaucetServiceServer)(nil),
|
|
193
225
|
Methods: []grpc.MethodDesc{
|
|
194
226
|
{
|
|
195
|
-
MethodName: "
|
|
196
|
-
Handler:
|
|
227
|
+
MethodName: "DripDev",
|
|
228
|
+
Handler: _FaucetService_DripDev_Handler,
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
MethodName: "DripVerifyTweet",
|
|
232
|
+
Handler: _FaucetService_DripVerifyTweet_Handler,
|
|
197
233
|
},
|
|
198
234
|
{
|
|
199
235
|
MethodName: "GetLinkedTwitters",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// @generated by protobuf-ts 2.8.
|
|
2
|
+
// @generated by protobuf-ts 2.8.0 with parameter eslint_disable
|
|
3
3
|
// @generated from protobuf file "ecs-relay.proto" (package "ecsrelay", syntax proto3)
|
|
4
4
|
// tslint:disable
|
|
5
5
|
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
|
6
6
|
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
|
7
7
|
import { ECSRelayService } from "./ecs-relay";
|
|
8
|
+
import type { PushManyRequest } from "./ecs-relay";
|
|
8
9
|
import type { PushResponse } from "./ecs-relay";
|
|
9
10
|
import type { PushRequest } from "./ecs-relay";
|
|
10
11
|
import type { Message } from "./ecs-relay";
|
|
@@ -15,6 +16,7 @@ import type { CountIdentitiesResponse } from "./ecs-relay";
|
|
|
15
16
|
import type { CountIdentitiesRequest } from "./ecs-relay";
|
|
16
17
|
import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
|
17
18
|
import type { Identity } from "./ecs-relay";
|
|
19
|
+
import type { Signature } from "./ecs-relay";
|
|
18
20
|
import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
|
|
19
21
|
import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
|
20
22
|
/**
|
|
@@ -24,17 +26,17 @@ import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
|
|
|
24
26
|
*/
|
|
25
27
|
export interface IECSRelayServiceClient {
|
|
26
28
|
/**
|
|
27
|
-
* @generated from protobuf rpc: Authenticate(ecsrelay.
|
|
29
|
+
* @generated from protobuf rpc: Authenticate(ecsrelay.Signature) returns (ecsrelay.Identity);
|
|
28
30
|
*/
|
|
29
|
-
authenticate(input:
|
|
31
|
+
authenticate(input: Signature, options?: RpcOptions): UnaryCall<Signature, Identity>;
|
|
30
32
|
/**
|
|
31
|
-
* @generated from protobuf rpc: Revoke(ecsrelay.
|
|
33
|
+
* @generated from protobuf rpc: Revoke(ecsrelay.Signature) returns (ecsrelay.Identity);
|
|
32
34
|
*/
|
|
33
|
-
revoke(input:
|
|
35
|
+
revoke(input: Signature, options?: RpcOptions): UnaryCall<Signature, Identity>;
|
|
34
36
|
/**
|
|
35
|
-
* @generated from protobuf rpc: Ping(ecsrelay.
|
|
37
|
+
* @generated from protobuf rpc: Ping(ecsrelay.Signature) returns (ecsrelay.Identity);
|
|
36
38
|
*/
|
|
37
|
-
ping(input:
|
|
39
|
+
ping(input: Signature, options?: RpcOptions): UnaryCall<Signature, Identity>;
|
|
38
40
|
/**
|
|
39
41
|
* @generated from protobuf rpc: CountAuthenticated(ecsrelay.CountIdentitiesRequest) returns (ecsrelay.CountIdentitiesResponse);
|
|
40
42
|
*/
|
|
@@ -58,13 +60,21 @@ export interface IECSRelayServiceClient {
|
|
|
58
60
|
*/
|
|
59
61
|
unsubscribe(input: SubscriptionRequest, options?: RpcOptions): UnaryCall<SubscriptionRequest, Subscription>;
|
|
60
62
|
/**
|
|
61
|
-
* @generated from protobuf rpc: OpenStream(ecsrelay.
|
|
63
|
+
* @generated from protobuf rpc: OpenStream(ecsrelay.Signature) returns (stream ecsrelay.Message);
|
|
62
64
|
*/
|
|
63
|
-
openStream(input:
|
|
65
|
+
openStream(input: Signature, options?: RpcOptions): ServerStreamingCall<Signature, Message>;
|
|
64
66
|
/**
|
|
67
|
+
* Push a single message to be relayed.
|
|
68
|
+
*
|
|
65
69
|
* @generated from protobuf rpc: Push(ecsrelay.PushRequest) returns (ecsrelay.PushResponse);
|
|
66
70
|
*/
|
|
67
71
|
push(input: PushRequest, options?: RpcOptions): UnaryCall<PushRequest, PushResponse>;
|
|
72
|
+
/**
|
|
73
|
+
* Push a series of messages to be relayed.
|
|
74
|
+
*
|
|
75
|
+
* @generated from protobuf rpc: PushMany(ecsrelay.PushManyRequest) returns (ecsrelay.PushResponse);
|
|
76
|
+
*/
|
|
77
|
+
pushMany(input: PushManyRequest, options?: RpcOptions): UnaryCall<PushManyRequest, PushResponse>;
|
|
68
78
|
}
|
|
69
79
|
/**
|
|
70
80
|
* The Relay Service definition.
|
|
@@ -77,28 +87,28 @@ export class ECSRelayServiceClient implements IECSRelayServiceClient, ServiceInf
|
|
|
77
87
|
options = ECSRelayService.options;
|
|
78
88
|
constructor(private readonly _transport: RpcTransport) {}
|
|
79
89
|
/**
|
|
80
|
-
* @generated from protobuf rpc: Authenticate(ecsrelay.
|
|
90
|
+
* @generated from protobuf rpc: Authenticate(ecsrelay.Signature) returns (ecsrelay.Identity);
|
|
81
91
|
*/
|
|
82
|
-
authenticate(input:
|
|
92
|
+
authenticate(input: Signature, options?: RpcOptions): UnaryCall<Signature, Identity> {
|
|
83
93
|
const method = this.methods[0],
|
|
84
94
|
opt = this._transport.mergeOptions(options);
|
|
85
|
-
return stackIntercept<
|
|
95
|
+
return stackIntercept<Signature, Identity>("unary", this._transport, method, opt, input);
|
|
86
96
|
}
|
|
87
97
|
/**
|
|
88
|
-
* @generated from protobuf rpc: Revoke(ecsrelay.
|
|
98
|
+
* @generated from protobuf rpc: Revoke(ecsrelay.Signature) returns (ecsrelay.Identity);
|
|
89
99
|
*/
|
|
90
|
-
revoke(input:
|
|
100
|
+
revoke(input: Signature, options?: RpcOptions): UnaryCall<Signature, Identity> {
|
|
91
101
|
const method = this.methods[1],
|
|
92
102
|
opt = this._transport.mergeOptions(options);
|
|
93
|
-
return stackIntercept<
|
|
103
|
+
return stackIntercept<Signature, Identity>("unary", this._transport, method, opt, input);
|
|
94
104
|
}
|
|
95
105
|
/**
|
|
96
|
-
* @generated from protobuf rpc: Ping(ecsrelay.
|
|
106
|
+
* @generated from protobuf rpc: Ping(ecsrelay.Signature) returns (ecsrelay.Identity);
|
|
97
107
|
*/
|
|
98
|
-
ping(input:
|
|
108
|
+
ping(input: Signature, options?: RpcOptions): UnaryCall<Signature, Identity> {
|
|
99
109
|
const method = this.methods[2],
|
|
100
110
|
opt = this._transport.mergeOptions(options);
|
|
101
|
-
return stackIntercept<
|
|
111
|
+
return stackIntercept<Signature, Identity>("unary", this._transport, method, opt, input);
|
|
102
112
|
}
|
|
103
113
|
/**
|
|
104
114
|
* @generated from protobuf rpc: CountAuthenticated(ecsrelay.CountIdentitiesRequest) returns (ecsrelay.CountIdentitiesResponse);
|
|
@@ -151,14 +161,16 @@ export class ECSRelayServiceClient implements IECSRelayServiceClient, ServiceInf
|
|
|
151
161
|
return stackIntercept<SubscriptionRequest, Subscription>("unary", this._transport, method, opt, input);
|
|
152
162
|
}
|
|
153
163
|
/**
|
|
154
|
-
* @generated from protobuf rpc: OpenStream(ecsrelay.
|
|
164
|
+
* @generated from protobuf rpc: OpenStream(ecsrelay.Signature) returns (stream ecsrelay.Message);
|
|
155
165
|
*/
|
|
156
|
-
openStream(input:
|
|
166
|
+
openStream(input: Signature, options?: RpcOptions): ServerStreamingCall<Signature, Message> {
|
|
157
167
|
const method = this.methods[7],
|
|
158
168
|
opt = this._transport.mergeOptions(options);
|
|
159
|
-
return stackIntercept<
|
|
169
|
+
return stackIntercept<Signature, Message>("serverStreaming", this._transport, method, opt, input);
|
|
160
170
|
}
|
|
161
171
|
/**
|
|
172
|
+
* Push a single message to be relayed.
|
|
173
|
+
*
|
|
162
174
|
* @generated from protobuf rpc: Push(ecsrelay.PushRequest) returns (ecsrelay.PushResponse);
|
|
163
175
|
*/
|
|
164
176
|
push(input: PushRequest, options?: RpcOptions): UnaryCall<PushRequest, PushResponse> {
|
|
@@ -166,4 +178,14 @@ export class ECSRelayServiceClient implements IECSRelayServiceClient, ServiceInf
|
|
|
166
178
|
opt = this._transport.mergeOptions(options);
|
|
167
179
|
return stackIntercept<PushRequest, PushResponse>("unary", this._transport, method, opt, input);
|
|
168
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* Push a series of messages to be relayed.
|
|
183
|
+
*
|
|
184
|
+
* @generated from protobuf rpc: PushMany(ecsrelay.PushManyRequest) returns (ecsrelay.PushResponse);
|
|
185
|
+
*/
|
|
186
|
+
pushMany(input: PushManyRequest, options?: RpcOptions): UnaryCall<PushManyRequest, PushResponse> {
|
|
187
|
+
const method = this.methods[9],
|
|
188
|
+
opt = this._transport.mergeOptions(options);
|
|
189
|
+
return stackIntercept<PushManyRequest, PushResponse>("unary", this._transport, method, opt, input);
|
|
190
|
+
}
|
|
169
191
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// @generated by protobuf-ts 2.8.
|
|
2
|
+
// @generated by protobuf-ts 2.8.0 with parameter eslint_disable
|
|
3
3
|
// @generated from protobuf file "ecs-relay.proto" (package "ecsrelay", syntax proto3)
|
|
4
4
|
// tslint:disable
|
|
5
5
|
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
@@ -24,6 +24,17 @@ export interface Identity {
|
|
|
24
24
|
*/
|
|
25
25
|
name: string;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Signature that a client must provide to prove ownership of identity.
|
|
29
|
+
*
|
|
30
|
+
* @generated from protobuf message ecsrelay.Signature
|
|
31
|
+
*/
|
|
32
|
+
export interface Signature {
|
|
33
|
+
/**
|
|
34
|
+
* @generated from protobuf field: string signature = 1;
|
|
35
|
+
*/
|
|
36
|
+
signature: string;
|
|
37
|
+
}
|
|
27
38
|
/**
|
|
28
39
|
* @generated from protobuf message ecsrelay.Message
|
|
29
40
|
*/
|
|
@@ -33,26 +44,30 @@ export interface Message {
|
|
|
33
44
|
*/
|
|
34
45
|
version: number;
|
|
35
46
|
/**
|
|
36
|
-
* @generated from protobuf field:
|
|
47
|
+
* @generated from protobuf field: string id = 2;
|
|
48
|
+
*/
|
|
49
|
+
id: string;
|
|
50
|
+
/**
|
|
51
|
+
* @generated from protobuf field: bytes data = 3;
|
|
37
52
|
*/
|
|
38
53
|
data: Uint8Array;
|
|
39
54
|
/**
|
|
40
|
-
* @generated from protobuf field: int64 timestamp =
|
|
55
|
+
* @generated from protobuf field: int64 timestamp = 4;
|
|
41
56
|
*/
|
|
42
57
|
timestamp: bigint;
|
|
43
58
|
/**
|
|
44
|
-
* @generated from protobuf field: string
|
|
59
|
+
* @generated from protobuf field: string signature = 5;
|
|
45
60
|
*/
|
|
46
|
-
|
|
61
|
+
signature: string;
|
|
47
62
|
}
|
|
48
63
|
/**
|
|
49
64
|
* @generated from protobuf message ecsrelay.SubscriptionRequest
|
|
50
65
|
*/
|
|
51
66
|
export interface SubscriptionRequest {
|
|
52
67
|
/**
|
|
53
|
-
* @generated from protobuf field: ecsrelay.
|
|
68
|
+
* @generated from protobuf field: ecsrelay.Signature signature = 1;
|
|
54
69
|
*/
|
|
55
|
-
|
|
70
|
+
signature?: Signature;
|
|
56
71
|
/**
|
|
57
72
|
* @generated from protobuf field: ecsrelay.Subscription subscription = 2;
|
|
58
73
|
*/
|
|
@@ -72,9 +87,22 @@ export interface Subscription {
|
|
|
72
87
|
*/
|
|
73
88
|
export interface PushRequest {
|
|
74
89
|
/**
|
|
75
|
-
* @generated from protobuf field:
|
|
90
|
+
* @generated from protobuf field: string label = 1;
|
|
91
|
+
*/
|
|
92
|
+
label: string;
|
|
93
|
+
/**
|
|
94
|
+
* @generated from protobuf field: ecsrelay.Message message = 2;
|
|
76
95
|
*/
|
|
77
|
-
|
|
96
|
+
message?: Message;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @generated from protobuf message ecsrelay.PushManyRequest
|
|
100
|
+
*/
|
|
101
|
+
export interface PushManyRequest {
|
|
102
|
+
/**
|
|
103
|
+
* @generated from protobuf field: ecsrelay.Signature signature = 1;
|
|
104
|
+
*/
|
|
105
|
+
signature?: Signature;
|
|
78
106
|
/**
|
|
79
107
|
* @generated from protobuf field: string label = 2;
|
|
80
108
|
*/
|
|
@@ -144,17 +172,60 @@ class Identity$Type extends MessageType<Identity> {
|
|
|
144
172
|
*/
|
|
145
173
|
export const Identity = new Identity$Type();
|
|
146
174
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
175
|
+
class Signature$Type extends MessageType<Signature> {
|
|
176
|
+
constructor() {
|
|
177
|
+
super("ecsrelay.Signature", [{ no: 1, name: "signature", kind: "scalar", T: 9 /*ScalarType.STRING*/ }]);
|
|
178
|
+
}
|
|
179
|
+
create(value?: PartialMessage<Signature>): Signature {
|
|
180
|
+
const message = { signature: "" };
|
|
181
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
182
|
+
if (value !== undefined) reflectionMergePartial<Signature>(this, message, value);
|
|
183
|
+
return message;
|
|
184
|
+
}
|
|
185
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Signature): Signature {
|
|
186
|
+
let message = target ?? this.create(),
|
|
187
|
+
end = reader.pos + length;
|
|
188
|
+
while (reader.pos < end) {
|
|
189
|
+
let [fieldNo, wireType] = reader.tag();
|
|
190
|
+
switch (fieldNo) {
|
|
191
|
+
case /* string signature */ 1:
|
|
192
|
+
message.signature = reader.string();
|
|
193
|
+
break;
|
|
194
|
+
default:
|
|
195
|
+
let u = options.readUnknownField;
|
|
196
|
+
if (u === "throw")
|
|
197
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
198
|
+
let d = reader.skip(wireType);
|
|
199
|
+
if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return message;
|
|
203
|
+
}
|
|
204
|
+
internalBinaryWrite(message: Signature, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
205
|
+
/* string signature = 1; */
|
|
206
|
+
if (message.signature !== "") writer.tag(1, WireType.LengthDelimited).string(message.signature);
|
|
207
|
+
let u = options.writeUnknownFields;
|
|
208
|
+
if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
209
|
+
return writer;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* @generated MessageType for protobuf message ecsrelay.Signature
|
|
214
|
+
*/
|
|
215
|
+
export const Signature = new Signature$Type();
|
|
216
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
147
217
|
class Message$Type extends MessageType<Message> {
|
|
148
218
|
constructor() {
|
|
149
219
|
super("ecsrelay.Message", [
|
|
150
220
|
{ no: 1, name: "version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ },
|
|
151
|
-
{ no: 2, name: "
|
|
152
|
-
{ no: 3, name: "
|
|
153
|
-
{ no: 4, name: "
|
|
221
|
+
{ no: 2, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
222
|
+
{ no: 3, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
|
|
223
|
+
{ no: 4, name: "timestamp", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
224
|
+
{ no: 5, name: "signature", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
154
225
|
]);
|
|
155
226
|
}
|
|
156
227
|
create(value?: PartialMessage<Message>): Message {
|
|
157
|
-
const message = { version: 0, data: new Uint8Array(0), timestamp: 0n,
|
|
228
|
+
const message = { version: 0, id: "", data: new Uint8Array(0), timestamp: 0n, signature: "" };
|
|
158
229
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
159
230
|
if (value !== undefined) reflectionMergePartial<Message>(this, message, value);
|
|
160
231
|
return message;
|
|
@@ -168,14 +239,17 @@ class Message$Type extends MessageType<Message> {
|
|
|
168
239
|
case /* uint32 version */ 1:
|
|
169
240
|
message.version = reader.uint32();
|
|
170
241
|
break;
|
|
171
|
-
case /*
|
|
242
|
+
case /* string id */ 2:
|
|
243
|
+
message.id = reader.string();
|
|
244
|
+
break;
|
|
245
|
+
case /* bytes data */ 3:
|
|
172
246
|
message.data = reader.bytes();
|
|
173
247
|
break;
|
|
174
|
-
case /* int64 timestamp */
|
|
248
|
+
case /* int64 timestamp */ 4:
|
|
175
249
|
message.timestamp = reader.int64().toBigInt();
|
|
176
250
|
break;
|
|
177
|
-
case /* string
|
|
178
|
-
message.
|
|
251
|
+
case /* string signature */ 5:
|
|
252
|
+
message.signature = reader.string();
|
|
179
253
|
break;
|
|
180
254
|
default:
|
|
181
255
|
let u = options.readUnknownField;
|
|
@@ -190,12 +264,14 @@ class Message$Type extends MessageType<Message> {
|
|
|
190
264
|
internalBinaryWrite(message: Message, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
191
265
|
/* uint32 version = 1; */
|
|
192
266
|
if (message.version !== 0) writer.tag(1, WireType.Varint).uint32(message.version);
|
|
193
|
-
/*
|
|
194
|
-
if (message.
|
|
195
|
-
/*
|
|
196
|
-
if (message.
|
|
197
|
-
/*
|
|
198
|
-
if (message.
|
|
267
|
+
/* string id = 2; */
|
|
268
|
+
if (message.id !== "") writer.tag(2, WireType.LengthDelimited).string(message.id);
|
|
269
|
+
/* bytes data = 3; */
|
|
270
|
+
if (message.data.length) writer.tag(3, WireType.LengthDelimited).bytes(message.data);
|
|
271
|
+
/* int64 timestamp = 4; */
|
|
272
|
+
if (message.timestamp !== 0n) writer.tag(4, WireType.Varint).int64(message.timestamp);
|
|
273
|
+
/* string signature = 5; */
|
|
274
|
+
if (message.signature !== "") writer.tag(5, WireType.LengthDelimited).string(message.signature);
|
|
199
275
|
let u = options.writeUnknownFields;
|
|
200
276
|
if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
201
277
|
return writer;
|
|
@@ -209,7 +285,7 @@ export const Message = new Message$Type();
|
|
|
209
285
|
class SubscriptionRequest$Type extends MessageType<SubscriptionRequest> {
|
|
210
286
|
constructor() {
|
|
211
287
|
super("ecsrelay.SubscriptionRequest", [
|
|
212
|
-
{ no: 1, name: "
|
|
288
|
+
{ no: 1, name: "signature", kind: "message", T: () => Signature },
|
|
213
289
|
{ no: 2, name: "subscription", kind: "message", T: () => Subscription },
|
|
214
290
|
]);
|
|
215
291
|
}
|
|
@@ -230,8 +306,8 @@ class SubscriptionRequest$Type extends MessageType<SubscriptionRequest> {
|
|
|
230
306
|
while (reader.pos < end) {
|
|
231
307
|
let [fieldNo, wireType] = reader.tag();
|
|
232
308
|
switch (fieldNo) {
|
|
233
|
-
case /* ecsrelay.
|
|
234
|
-
message.
|
|
309
|
+
case /* ecsrelay.Signature signature */ 1:
|
|
310
|
+
message.signature = Signature.internalBinaryRead(reader, reader.uint32(), options, message.signature);
|
|
235
311
|
break;
|
|
236
312
|
case /* ecsrelay.Subscription subscription */ 2:
|
|
237
313
|
message.subscription = Subscription.internalBinaryRead(
|
|
@@ -252,9 +328,9 @@ class SubscriptionRequest$Type extends MessageType<SubscriptionRequest> {
|
|
|
252
328
|
return message;
|
|
253
329
|
}
|
|
254
330
|
internalBinaryWrite(message: SubscriptionRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
255
|
-
/* ecsrelay.
|
|
256
|
-
if (message.
|
|
257
|
-
|
|
331
|
+
/* ecsrelay.Signature signature = 1; */
|
|
332
|
+
if (message.signature)
|
|
333
|
+
Signature.internalBinaryWrite(message.signature, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
258
334
|
/* ecsrelay.Subscription subscription = 2; */
|
|
259
335
|
if (message.subscription)
|
|
260
336
|
Subscription.internalBinaryWrite(
|
|
@@ -322,13 +398,12 @@ export const Subscription = new Subscription$Type();
|
|
|
322
398
|
class PushRequest$Type extends MessageType<PushRequest> {
|
|
323
399
|
constructor() {
|
|
324
400
|
super("ecsrelay.PushRequest", [
|
|
325
|
-
{ no: 1, name: "
|
|
326
|
-
{ no: 2, name: "
|
|
327
|
-
{ no: 3, name: "messages", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Message },
|
|
401
|
+
{ no: 1, name: "label", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
402
|
+
{ no: 2, name: "message", kind: "message", T: () => Message },
|
|
328
403
|
]);
|
|
329
404
|
}
|
|
330
405
|
create(value?: PartialMessage<PushRequest>): PushRequest {
|
|
331
|
-
const message = { label: ""
|
|
406
|
+
const message = { label: "" };
|
|
332
407
|
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
333
408
|
if (value !== undefined) reflectionMergePartial<PushRequest>(this, message, value);
|
|
334
409
|
return message;
|
|
@@ -344,8 +419,65 @@ class PushRequest$Type extends MessageType<PushRequest> {
|
|
|
344
419
|
while (reader.pos < end) {
|
|
345
420
|
let [fieldNo, wireType] = reader.tag();
|
|
346
421
|
switch (fieldNo) {
|
|
347
|
-
case /*
|
|
348
|
-
message.
|
|
422
|
+
case /* string label */ 1:
|
|
423
|
+
message.label = reader.string();
|
|
424
|
+
break;
|
|
425
|
+
case /* ecsrelay.Message message */ 2:
|
|
426
|
+
message.message = Message.internalBinaryRead(reader, reader.uint32(), options, message.message);
|
|
427
|
+
break;
|
|
428
|
+
default:
|
|
429
|
+
let u = options.readUnknownField;
|
|
430
|
+
if (u === "throw")
|
|
431
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
432
|
+
let d = reader.skip(wireType);
|
|
433
|
+
if (u !== false) (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
return message;
|
|
437
|
+
}
|
|
438
|
+
internalBinaryWrite(message: PushRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
439
|
+
/* string label = 1; */
|
|
440
|
+
if (message.label !== "") writer.tag(1, WireType.LengthDelimited).string(message.label);
|
|
441
|
+
/* ecsrelay.Message message = 2; */
|
|
442
|
+
if (message.message)
|
|
443
|
+
Message.internalBinaryWrite(message.message, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
444
|
+
let u = options.writeUnknownFields;
|
|
445
|
+
if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
446
|
+
return writer;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* @generated MessageType for protobuf message ecsrelay.PushRequest
|
|
451
|
+
*/
|
|
452
|
+
export const PushRequest = new PushRequest$Type();
|
|
453
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
454
|
+
class PushManyRequest$Type extends MessageType<PushManyRequest> {
|
|
455
|
+
constructor() {
|
|
456
|
+
super("ecsrelay.PushManyRequest", [
|
|
457
|
+
{ no: 1, name: "signature", kind: "message", T: () => Signature },
|
|
458
|
+
{ no: 2, name: "label", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
459
|
+
{ no: 3, name: "messages", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Message },
|
|
460
|
+
]);
|
|
461
|
+
}
|
|
462
|
+
create(value?: PartialMessage<PushManyRequest>): PushManyRequest {
|
|
463
|
+
const message = { label: "", messages: [] };
|
|
464
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
465
|
+
if (value !== undefined) reflectionMergePartial<PushManyRequest>(this, message, value);
|
|
466
|
+
return message;
|
|
467
|
+
}
|
|
468
|
+
internalBinaryRead(
|
|
469
|
+
reader: IBinaryReader,
|
|
470
|
+
length: number,
|
|
471
|
+
options: BinaryReadOptions,
|
|
472
|
+
target?: PushManyRequest
|
|
473
|
+
): PushManyRequest {
|
|
474
|
+
let message = target ?? this.create(),
|
|
475
|
+
end = reader.pos + length;
|
|
476
|
+
while (reader.pos < end) {
|
|
477
|
+
let [fieldNo, wireType] = reader.tag();
|
|
478
|
+
switch (fieldNo) {
|
|
479
|
+
case /* ecsrelay.Signature signature */ 1:
|
|
480
|
+
message.signature = Signature.internalBinaryRead(reader, reader.uint32(), options, message.signature);
|
|
349
481
|
break;
|
|
350
482
|
case /* string label */ 2:
|
|
351
483
|
message.label = reader.string();
|
|
@@ -363,10 +495,10 @@ class PushRequest$Type extends MessageType<PushRequest> {
|
|
|
363
495
|
}
|
|
364
496
|
return message;
|
|
365
497
|
}
|
|
366
|
-
internalBinaryWrite(message:
|
|
367
|
-
/* ecsrelay.
|
|
368
|
-
if (message.
|
|
369
|
-
|
|
498
|
+
internalBinaryWrite(message: PushManyRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
499
|
+
/* ecsrelay.Signature signature = 1; */
|
|
500
|
+
if (message.signature)
|
|
501
|
+
Signature.internalBinaryWrite(message.signature, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
370
502
|
/* string label = 2; */
|
|
371
503
|
if (message.label !== "") writer.tag(2, WireType.LengthDelimited).string(message.label);
|
|
372
504
|
/* repeated ecsrelay.Message messages = 3; */
|
|
@@ -378,9 +510,9 @@ class PushRequest$Type extends MessageType<PushRequest> {
|
|
|
378
510
|
}
|
|
379
511
|
}
|
|
380
512
|
/**
|
|
381
|
-
* @generated MessageType for protobuf message ecsrelay.
|
|
513
|
+
* @generated MessageType for protobuf message ecsrelay.PushManyRequest
|
|
382
514
|
*/
|
|
383
|
-
export const
|
|
515
|
+
export const PushManyRequest = new PushManyRequest$Type();
|
|
384
516
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
385
517
|
class PushResponse$Type extends MessageType<PushResponse> {
|
|
386
518
|
constructor() {
|
|
@@ -498,13 +630,14 @@ export const CountIdentitiesResponse = new CountIdentitiesResponse$Type();
|
|
|
498
630
|
* @generated ServiceType for protobuf service ecsrelay.ECSRelayService
|
|
499
631
|
*/
|
|
500
632
|
export const ECSRelayService = new ServiceType("ecsrelay.ECSRelayService", [
|
|
501
|
-
{ name: "Authenticate", options: {}, I:
|
|
502
|
-
{ name: "Revoke", options: {}, I:
|
|
503
|
-
{ name: "Ping", options: {}, I:
|
|
633
|
+
{ name: "Authenticate", options: {}, I: Signature, O: Identity },
|
|
634
|
+
{ name: "Revoke", options: {}, I: Signature, O: Identity },
|
|
635
|
+
{ name: "Ping", options: {}, I: Signature, O: Identity },
|
|
504
636
|
{ name: "CountAuthenticated", options: {}, I: CountIdentitiesRequest, O: CountIdentitiesResponse },
|
|
505
637
|
{ name: "CountConnected", options: {}, I: CountIdentitiesRequest, O: CountIdentitiesResponse },
|
|
506
638
|
{ name: "Subscribe", options: {}, I: SubscriptionRequest, O: Subscription },
|
|
507
639
|
{ name: "Unsubscribe", options: {}, I: SubscriptionRequest, O: Subscription },
|
|
508
|
-
{ name: "OpenStream", serverStreaming: true, options: {}, I:
|
|
640
|
+
{ name: "OpenStream", serverStreaming: true, options: {}, I: Signature, O: Message },
|
|
509
641
|
{ name: "Push", options: {}, I: PushRequest, O: PushResponse },
|
|
642
|
+
{ name: "PushMany", options: {}, I: PushManyRequest, O: PushResponse },
|
|
510
643
|
]);
|