@latticexyz/services 2.0.0-snapshot-test-32d38619 → 2.0.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/README.md +1 -241
- package/dist/faucet.d.ts +369 -0
- package/dist/faucet.js.map +1 -1
- package/package.json +5 -25
- package/protobuf/ts/faucet/faucet.ts +19 -19
- package/protobuf/ts/index.ts +0 -3
- package/ts/faucet/createFaucetService.ts +1 -1
- package/README.v1.md +0 -119
- package/bin/faucet +0 -0
- package/bin/mode +0 -0
- package/dist/ecs-relay.js +0 -683
- package/dist/ecs-relay.js.map +0 -1
- package/dist/ecs-snapshot.js +0 -810
- package/dist/ecs-snapshot.js.map +0 -1
- package/dist/ecs-stream.js +0 -391
- package/dist/ecs-stream.js.map +0 -1
- package/dist/mode.js +0 -1481
- package/dist/mode.js.map +0 -1
- package/protobuf/go/ecs-relay/ecs-relay.pb.go +0 -971
- package/protobuf/go/ecs-relay/ecs-relay_grpc.pb.go +0 -545
- package/protobuf/go/ecs-snapshot/ecs-snapshot.pb.go +0 -1124
- package/protobuf/go/ecs-snapshot/ecs-snapshot_grpc.pb.go +0 -502
- package/protobuf/go/ecs-stream/ecs-stream.pb.go +0 -525
- package/protobuf/go/ecs-stream/ecs-stream_grpc.pb.go +0 -138
- package/protobuf/go/faucet/faucet.pb.go +0 -1133
- package/protobuf/go/faucet/faucet_grpc.pb.go +0 -370
- package/protobuf/go/mode/mode.pb.go +0 -1772
- package/protobuf/go/mode/mode_grpc.pb.go +0 -283
- package/protobuf/ts/ecs-relay/ecs-relay.ts +0 -889
- package/protobuf/ts/ecs-snapshot/ecs-snapshot.ts +0 -1078
- package/protobuf/ts/ecs-stream/ecs-stream.ts +0 -508
- package/protobuf/ts/mode/google/protobuf/any.ts +0 -191
- package/protobuf/ts/mode/mode.ts +0 -1875
@@ -1,889 +0,0 @@
|
|
1
|
-
/* eslint-disable */
|
2
|
-
import Long from "long";
|
3
|
-
import type { CallContext, CallOptions } from "nice-grpc-common";
|
4
|
-
import _m0 from "protobufjs/minimal.js";
|
5
|
-
|
6
|
-
export const protobufPackage = "ecsrelay";
|
7
|
-
|
8
|
-
/** Identifies a client connecting to Relay Service. */
|
9
|
-
export interface Identity {
|
10
|
-
name: string;
|
11
|
-
}
|
12
|
-
|
13
|
-
/** Signature that a client must provide to prove ownership of identity. */
|
14
|
-
export interface Signature {
|
15
|
-
signature: string;
|
16
|
-
}
|
17
|
-
|
18
|
-
export interface Message {
|
19
|
-
version: number;
|
20
|
-
id: string;
|
21
|
-
data: Uint8Array;
|
22
|
-
timestamp: number;
|
23
|
-
signature: string;
|
24
|
-
}
|
25
|
-
|
26
|
-
export interface SubscriptionRequest {
|
27
|
-
signature: Signature | undefined;
|
28
|
-
subscription: Subscription | undefined;
|
29
|
-
}
|
30
|
-
|
31
|
-
export interface Subscription {
|
32
|
-
label: string;
|
33
|
-
}
|
34
|
-
|
35
|
-
export interface PushRequest {
|
36
|
-
label: string;
|
37
|
-
message: Message | undefined;
|
38
|
-
}
|
39
|
-
|
40
|
-
export interface PushManyRequest {
|
41
|
-
signature: Signature | undefined;
|
42
|
-
label: string;
|
43
|
-
messages: Message[];
|
44
|
-
}
|
45
|
-
|
46
|
-
export interface PushResponse {}
|
47
|
-
|
48
|
-
export interface CountIdentitiesRequest {}
|
49
|
-
|
50
|
-
export interface CountIdentitiesResponse {
|
51
|
-
count: number;
|
52
|
-
}
|
53
|
-
|
54
|
-
export interface BalanceRequest {}
|
55
|
-
|
56
|
-
export interface BalanceResponse {
|
57
|
-
wei: number;
|
58
|
-
ether: number;
|
59
|
-
}
|
60
|
-
|
61
|
-
function createBaseIdentity(): Identity {
|
62
|
-
return { name: "" };
|
63
|
-
}
|
64
|
-
|
65
|
-
export const Identity = {
|
66
|
-
encode(message: Identity, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
67
|
-
if (message.name !== "") {
|
68
|
-
writer.uint32(10).string(message.name);
|
69
|
-
}
|
70
|
-
return writer;
|
71
|
-
},
|
72
|
-
|
73
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Identity {
|
74
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
75
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
76
|
-
const message = createBaseIdentity();
|
77
|
-
while (reader.pos < end) {
|
78
|
-
const tag = reader.uint32();
|
79
|
-
switch (tag >>> 3) {
|
80
|
-
case 1:
|
81
|
-
if (tag != 10) {
|
82
|
-
break;
|
83
|
-
}
|
84
|
-
|
85
|
-
message.name = reader.string();
|
86
|
-
continue;
|
87
|
-
}
|
88
|
-
if ((tag & 7) == 4 || tag == 0) {
|
89
|
-
break;
|
90
|
-
}
|
91
|
-
reader.skipType(tag & 7);
|
92
|
-
}
|
93
|
-
return message;
|
94
|
-
},
|
95
|
-
|
96
|
-
create(base?: DeepPartial<Identity>): Identity {
|
97
|
-
return Identity.fromPartial(base ?? {});
|
98
|
-
},
|
99
|
-
|
100
|
-
fromPartial(object: DeepPartial<Identity>): Identity {
|
101
|
-
const message = createBaseIdentity();
|
102
|
-
message.name = object.name ?? "";
|
103
|
-
return message;
|
104
|
-
},
|
105
|
-
};
|
106
|
-
|
107
|
-
function createBaseSignature(): Signature {
|
108
|
-
return { signature: "" };
|
109
|
-
}
|
110
|
-
|
111
|
-
export const Signature = {
|
112
|
-
encode(message: Signature, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
113
|
-
if (message.signature !== "") {
|
114
|
-
writer.uint32(10).string(message.signature);
|
115
|
-
}
|
116
|
-
return writer;
|
117
|
-
},
|
118
|
-
|
119
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Signature {
|
120
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
121
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
122
|
-
const message = createBaseSignature();
|
123
|
-
while (reader.pos < end) {
|
124
|
-
const tag = reader.uint32();
|
125
|
-
switch (tag >>> 3) {
|
126
|
-
case 1:
|
127
|
-
if (tag != 10) {
|
128
|
-
break;
|
129
|
-
}
|
130
|
-
|
131
|
-
message.signature = reader.string();
|
132
|
-
continue;
|
133
|
-
}
|
134
|
-
if ((tag & 7) == 4 || tag == 0) {
|
135
|
-
break;
|
136
|
-
}
|
137
|
-
reader.skipType(tag & 7);
|
138
|
-
}
|
139
|
-
return message;
|
140
|
-
},
|
141
|
-
|
142
|
-
create(base?: DeepPartial<Signature>): Signature {
|
143
|
-
return Signature.fromPartial(base ?? {});
|
144
|
-
},
|
145
|
-
|
146
|
-
fromPartial(object: DeepPartial<Signature>): Signature {
|
147
|
-
const message = createBaseSignature();
|
148
|
-
message.signature = object.signature ?? "";
|
149
|
-
return message;
|
150
|
-
},
|
151
|
-
};
|
152
|
-
|
153
|
-
function createBaseMessage(): Message {
|
154
|
-
return { version: 0, id: "", data: new Uint8Array(), timestamp: 0, signature: "" };
|
155
|
-
}
|
156
|
-
|
157
|
-
export const Message = {
|
158
|
-
encode(message: Message, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
159
|
-
if (message.version !== 0) {
|
160
|
-
writer.uint32(8).uint32(message.version);
|
161
|
-
}
|
162
|
-
if (message.id !== "") {
|
163
|
-
writer.uint32(18).string(message.id);
|
164
|
-
}
|
165
|
-
if (message.data.length !== 0) {
|
166
|
-
writer.uint32(26).bytes(message.data);
|
167
|
-
}
|
168
|
-
if (message.timestamp !== 0) {
|
169
|
-
writer.uint32(32).int64(message.timestamp);
|
170
|
-
}
|
171
|
-
if (message.signature !== "") {
|
172
|
-
writer.uint32(42).string(message.signature);
|
173
|
-
}
|
174
|
-
return writer;
|
175
|
-
},
|
176
|
-
|
177
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Message {
|
178
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
179
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
180
|
-
const message = createBaseMessage();
|
181
|
-
while (reader.pos < end) {
|
182
|
-
const tag = reader.uint32();
|
183
|
-
switch (tag >>> 3) {
|
184
|
-
case 1:
|
185
|
-
if (tag != 8) {
|
186
|
-
break;
|
187
|
-
}
|
188
|
-
|
189
|
-
message.version = reader.uint32();
|
190
|
-
continue;
|
191
|
-
case 2:
|
192
|
-
if (tag != 18) {
|
193
|
-
break;
|
194
|
-
}
|
195
|
-
|
196
|
-
message.id = reader.string();
|
197
|
-
continue;
|
198
|
-
case 3:
|
199
|
-
if (tag != 26) {
|
200
|
-
break;
|
201
|
-
}
|
202
|
-
|
203
|
-
message.data = reader.bytes();
|
204
|
-
continue;
|
205
|
-
case 4:
|
206
|
-
if (tag != 32) {
|
207
|
-
break;
|
208
|
-
}
|
209
|
-
|
210
|
-
message.timestamp = longToNumber(reader.int64() as Long);
|
211
|
-
continue;
|
212
|
-
case 5:
|
213
|
-
if (tag != 42) {
|
214
|
-
break;
|
215
|
-
}
|
216
|
-
|
217
|
-
message.signature = reader.string();
|
218
|
-
continue;
|
219
|
-
}
|
220
|
-
if ((tag & 7) == 4 || tag == 0) {
|
221
|
-
break;
|
222
|
-
}
|
223
|
-
reader.skipType(tag & 7);
|
224
|
-
}
|
225
|
-
return message;
|
226
|
-
},
|
227
|
-
|
228
|
-
create(base?: DeepPartial<Message>): Message {
|
229
|
-
return Message.fromPartial(base ?? {});
|
230
|
-
},
|
231
|
-
|
232
|
-
fromPartial(object: DeepPartial<Message>): Message {
|
233
|
-
const message = createBaseMessage();
|
234
|
-
message.version = object.version ?? 0;
|
235
|
-
message.id = object.id ?? "";
|
236
|
-
message.data = object.data ?? new Uint8Array();
|
237
|
-
message.timestamp = object.timestamp ?? 0;
|
238
|
-
message.signature = object.signature ?? "";
|
239
|
-
return message;
|
240
|
-
},
|
241
|
-
};
|
242
|
-
|
243
|
-
function createBaseSubscriptionRequest(): SubscriptionRequest {
|
244
|
-
return { signature: undefined, subscription: undefined };
|
245
|
-
}
|
246
|
-
|
247
|
-
export const SubscriptionRequest = {
|
248
|
-
encode(message: SubscriptionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
249
|
-
if (message.signature !== undefined) {
|
250
|
-
Signature.encode(message.signature, writer.uint32(10).fork()).ldelim();
|
251
|
-
}
|
252
|
-
if (message.subscription !== undefined) {
|
253
|
-
Subscription.encode(message.subscription, writer.uint32(18).fork()).ldelim();
|
254
|
-
}
|
255
|
-
return writer;
|
256
|
-
},
|
257
|
-
|
258
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SubscriptionRequest {
|
259
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
260
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
261
|
-
const message = createBaseSubscriptionRequest();
|
262
|
-
while (reader.pos < end) {
|
263
|
-
const tag = reader.uint32();
|
264
|
-
switch (tag >>> 3) {
|
265
|
-
case 1:
|
266
|
-
if (tag != 10) {
|
267
|
-
break;
|
268
|
-
}
|
269
|
-
|
270
|
-
message.signature = Signature.decode(reader, reader.uint32());
|
271
|
-
continue;
|
272
|
-
case 2:
|
273
|
-
if (tag != 18) {
|
274
|
-
break;
|
275
|
-
}
|
276
|
-
|
277
|
-
message.subscription = Subscription.decode(reader, reader.uint32());
|
278
|
-
continue;
|
279
|
-
}
|
280
|
-
if ((tag & 7) == 4 || tag == 0) {
|
281
|
-
break;
|
282
|
-
}
|
283
|
-
reader.skipType(tag & 7);
|
284
|
-
}
|
285
|
-
return message;
|
286
|
-
},
|
287
|
-
|
288
|
-
create(base?: DeepPartial<SubscriptionRequest>): SubscriptionRequest {
|
289
|
-
return SubscriptionRequest.fromPartial(base ?? {});
|
290
|
-
},
|
291
|
-
|
292
|
-
fromPartial(object: DeepPartial<SubscriptionRequest>): SubscriptionRequest {
|
293
|
-
const message = createBaseSubscriptionRequest();
|
294
|
-
message.signature =
|
295
|
-
object.signature !== undefined && object.signature !== null ? Signature.fromPartial(object.signature) : undefined;
|
296
|
-
message.subscription =
|
297
|
-
object.subscription !== undefined && object.subscription !== null
|
298
|
-
? Subscription.fromPartial(object.subscription)
|
299
|
-
: undefined;
|
300
|
-
return message;
|
301
|
-
},
|
302
|
-
};
|
303
|
-
|
304
|
-
function createBaseSubscription(): Subscription {
|
305
|
-
return { label: "" };
|
306
|
-
}
|
307
|
-
|
308
|
-
export const Subscription = {
|
309
|
-
encode(message: Subscription, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
310
|
-
if (message.label !== "") {
|
311
|
-
writer.uint32(10).string(message.label);
|
312
|
-
}
|
313
|
-
return writer;
|
314
|
-
},
|
315
|
-
|
316
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Subscription {
|
317
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
318
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
319
|
-
const message = createBaseSubscription();
|
320
|
-
while (reader.pos < end) {
|
321
|
-
const tag = reader.uint32();
|
322
|
-
switch (tag >>> 3) {
|
323
|
-
case 1:
|
324
|
-
if (tag != 10) {
|
325
|
-
break;
|
326
|
-
}
|
327
|
-
|
328
|
-
message.label = reader.string();
|
329
|
-
continue;
|
330
|
-
}
|
331
|
-
if ((tag & 7) == 4 || tag == 0) {
|
332
|
-
break;
|
333
|
-
}
|
334
|
-
reader.skipType(tag & 7);
|
335
|
-
}
|
336
|
-
return message;
|
337
|
-
},
|
338
|
-
|
339
|
-
create(base?: DeepPartial<Subscription>): Subscription {
|
340
|
-
return Subscription.fromPartial(base ?? {});
|
341
|
-
},
|
342
|
-
|
343
|
-
fromPartial(object: DeepPartial<Subscription>): Subscription {
|
344
|
-
const message = createBaseSubscription();
|
345
|
-
message.label = object.label ?? "";
|
346
|
-
return message;
|
347
|
-
},
|
348
|
-
};
|
349
|
-
|
350
|
-
function createBasePushRequest(): PushRequest {
|
351
|
-
return { label: "", message: undefined };
|
352
|
-
}
|
353
|
-
|
354
|
-
export const PushRequest = {
|
355
|
-
encode(message: PushRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
356
|
-
if (message.label !== "") {
|
357
|
-
writer.uint32(10).string(message.label);
|
358
|
-
}
|
359
|
-
if (message.message !== undefined) {
|
360
|
-
Message.encode(message.message, writer.uint32(18).fork()).ldelim();
|
361
|
-
}
|
362
|
-
return writer;
|
363
|
-
},
|
364
|
-
|
365
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): PushRequest {
|
366
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
367
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
368
|
-
const message = createBasePushRequest();
|
369
|
-
while (reader.pos < end) {
|
370
|
-
const tag = reader.uint32();
|
371
|
-
switch (tag >>> 3) {
|
372
|
-
case 1:
|
373
|
-
if (tag != 10) {
|
374
|
-
break;
|
375
|
-
}
|
376
|
-
|
377
|
-
message.label = reader.string();
|
378
|
-
continue;
|
379
|
-
case 2:
|
380
|
-
if (tag != 18) {
|
381
|
-
break;
|
382
|
-
}
|
383
|
-
|
384
|
-
message.message = Message.decode(reader, reader.uint32());
|
385
|
-
continue;
|
386
|
-
}
|
387
|
-
if ((tag & 7) == 4 || tag == 0) {
|
388
|
-
break;
|
389
|
-
}
|
390
|
-
reader.skipType(tag & 7);
|
391
|
-
}
|
392
|
-
return message;
|
393
|
-
},
|
394
|
-
|
395
|
-
create(base?: DeepPartial<PushRequest>): PushRequest {
|
396
|
-
return PushRequest.fromPartial(base ?? {});
|
397
|
-
},
|
398
|
-
|
399
|
-
fromPartial(object: DeepPartial<PushRequest>): PushRequest {
|
400
|
-
const message = createBasePushRequest();
|
401
|
-
message.label = object.label ?? "";
|
402
|
-
message.message =
|
403
|
-
object.message !== undefined && object.message !== null ? Message.fromPartial(object.message) : undefined;
|
404
|
-
return message;
|
405
|
-
},
|
406
|
-
};
|
407
|
-
|
408
|
-
function createBasePushManyRequest(): PushManyRequest {
|
409
|
-
return { signature: undefined, label: "", messages: [] };
|
410
|
-
}
|
411
|
-
|
412
|
-
export const PushManyRequest = {
|
413
|
-
encode(message: PushManyRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
414
|
-
if (message.signature !== undefined) {
|
415
|
-
Signature.encode(message.signature, writer.uint32(10).fork()).ldelim();
|
416
|
-
}
|
417
|
-
if (message.label !== "") {
|
418
|
-
writer.uint32(18).string(message.label);
|
419
|
-
}
|
420
|
-
for (const v of message.messages) {
|
421
|
-
Message.encode(v!, writer.uint32(26).fork()).ldelim();
|
422
|
-
}
|
423
|
-
return writer;
|
424
|
-
},
|
425
|
-
|
426
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): PushManyRequest {
|
427
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
428
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
429
|
-
const message = createBasePushManyRequest();
|
430
|
-
while (reader.pos < end) {
|
431
|
-
const tag = reader.uint32();
|
432
|
-
switch (tag >>> 3) {
|
433
|
-
case 1:
|
434
|
-
if (tag != 10) {
|
435
|
-
break;
|
436
|
-
}
|
437
|
-
|
438
|
-
message.signature = Signature.decode(reader, reader.uint32());
|
439
|
-
continue;
|
440
|
-
case 2:
|
441
|
-
if (tag != 18) {
|
442
|
-
break;
|
443
|
-
}
|
444
|
-
|
445
|
-
message.label = reader.string();
|
446
|
-
continue;
|
447
|
-
case 3:
|
448
|
-
if (tag != 26) {
|
449
|
-
break;
|
450
|
-
}
|
451
|
-
|
452
|
-
message.messages.push(Message.decode(reader, reader.uint32()));
|
453
|
-
continue;
|
454
|
-
}
|
455
|
-
if ((tag & 7) == 4 || tag == 0) {
|
456
|
-
break;
|
457
|
-
}
|
458
|
-
reader.skipType(tag & 7);
|
459
|
-
}
|
460
|
-
return message;
|
461
|
-
},
|
462
|
-
|
463
|
-
create(base?: DeepPartial<PushManyRequest>): PushManyRequest {
|
464
|
-
return PushManyRequest.fromPartial(base ?? {});
|
465
|
-
},
|
466
|
-
|
467
|
-
fromPartial(object: DeepPartial<PushManyRequest>): PushManyRequest {
|
468
|
-
const message = createBasePushManyRequest();
|
469
|
-
message.signature =
|
470
|
-
object.signature !== undefined && object.signature !== null ? Signature.fromPartial(object.signature) : undefined;
|
471
|
-
message.label = object.label ?? "";
|
472
|
-
message.messages = object.messages?.map((e) => Message.fromPartial(e)) || [];
|
473
|
-
return message;
|
474
|
-
},
|
475
|
-
};
|
476
|
-
|
477
|
-
function createBasePushResponse(): PushResponse {
|
478
|
-
return {};
|
479
|
-
}
|
480
|
-
|
481
|
-
export const PushResponse = {
|
482
|
-
encode(_: PushResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
483
|
-
return writer;
|
484
|
-
},
|
485
|
-
|
486
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): PushResponse {
|
487
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
488
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
489
|
-
const message = createBasePushResponse();
|
490
|
-
while (reader.pos < end) {
|
491
|
-
const tag = reader.uint32();
|
492
|
-
switch (tag >>> 3) {
|
493
|
-
}
|
494
|
-
if ((tag & 7) == 4 || tag == 0) {
|
495
|
-
break;
|
496
|
-
}
|
497
|
-
reader.skipType(tag & 7);
|
498
|
-
}
|
499
|
-
return message;
|
500
|
-
},
|
501
|
-
|
502
|
-
create(base?: DeepPartial<PushResponse>): PushResponse {
|
503
|
-
return PushResponse.fromPartial(base ?? {});
|
504
|
-
},
|
505
|
-
|
506
|
-
fromPartial(_: DeepPartial<PushResponse>): PushResponse {
|
507
|
-
const message = createBasePushResponse();
|
508
|
-
return message;
|
509
|
-
},
|
510
|
-
};
|
511
|
-
|
512
|
-
function createBaseCountIdentitiesRequest(): CountIdentitiesRequest {
|
513
|
-
return {};
|
514
|
-
}
|
515
|
-
|
516
|
-
export const CountIdentitiesRequest = {
|
517
|
-
encode(_: CountIdentitiesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
518
|
-
return writer;
|
519
|
-
},
|
520
|
-
|
521
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): CountIdentitiesRequest {
|
522
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
523
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
524
|
-
const message = createBaseCountIdentitiesRequest();
|
525
|
-
while (reader.pos < end) {
|
526
|
-
const tag = reader.uint32();
|
527
|
-
switch (tag >>> 3) {
|
528
|
-
}
|
529
|
-
if ((tag & 7) == 4 || tag == 0) {
|
530
|
-
break;
|
531
|
-
}
|
532
|
-
reader.skipType(tag & 7);
|
533
|
-
}
|
534
|
-
return message;
|
535
|
-
},
|
536
|
-
|
537
|
-
create(base?: DeepPartial<CountIdentitiesRequest>): CountIdentitiesRequest {
|
538
|
-
return CountIdentitiesRequest.fromPartial(base ?? {});
|
539
|
-
},
|
540
|
-
|
541
|
-
fromPartial(_: DeepPartial<CountIdentitiesRequest>): CountIdentitiesRequest {
|
542
|
-
const message = createBaseCountIdentitiesRequest();
|
543
|
-
return message;
|
544
|
-
},
|
545
|
-
};
|
546
|
-
|
547
|
-
function createBaseCountIdentitiesResponse(): CountIdentitiesResponse {
|
548
|
-
return { count: 0 };
|
549
|
-
}
|
550
|
-
|
551
|
-
export const CountIdentitiesResponse = {
|
552
|
-
encode(message: CountIdentitiesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
553
|
-
if (message.count !== 0) {
|
554
|
-
writer.uint32(8).uint32(message.count);
|
555
|
-
}
|
556
|
-
return writer;
|
557
|
-
},
|
558
|
-
|
559
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): CountIdentitiesResponse {
|
560
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
561
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
562
|
-
const message = createBaseCountIdentitiesResponse();
|
563
|
-
while (reader.pos < end) {
|
564
|
-
const tag = reader.uint32();
|
565
|
-
switch (tag >>> 3) {
|
566
|
-
case 1:
|
567
|
-
if (tag != 8) {
|
568
|
-
break;
|
569
|
-
}
|
570
|
-
|
571
|
-
message.count = reader.uint32();
|
572
|
-
continue;
|
573
|
-
}
|
574
|
-
if ((tag & 7) == 4 || tag == 0) {
|
575
|
-
break;
|
576
|
-
}
|
577
|
-
reader.skipType(tag & 7);
|
578
|
-
}
|
579
|
-
return message;
|
580
|
-
},
|
581
|
-
|
582
|
-
create(base?: DeepPartial<CountIdentitiesResponse>): CountIdentitiesResponse {
|
583
|
-
return CountIdentitiesResponse.fromPartial(base ?? {});
|
584
|
-
},
|
585
|
-
|
586
|
-
fromPartial(object: DeepPartial<CountIdentitiesResponse>): CountIdentitiesResponse {
|
587
|
-
const message = createBaseCountIdentitiesResponse();
|
588
|
-
message.count = object.count ?? 0;
|
589
|
-
return message;
|
590
|
-
},
|
591
|
-
};
|
592
|
-
|
593
|
-
function createBaseBalanceRequest(): BalanceRequest {
|
594
|
-
return {};
|
595
|
-
}
|
596
|
-
|
597
|
-
export const BalanceRequest = {
|
598
|
-
encode(_: BalanceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
599
|
-
return writer;
|
600
|
-
},
|
601
|
-
|
602
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): BalanceRequest {
|
603
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
604
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
605
|
-
const message = createBaseBalanceRequest();
|
606
|
-
while (reader.pos < end) {
|
607
|
-
const tag = reader.uint32();
|
608
|
-
switch (tag >>> 3) {
|
609
|
-
}
|
610
|
-
if ((tag & 7) == 4 || tag == 0) {
|
611
|
-
break;
|
612
|
-
}
|
613
|
-
reader.skipType(tag & 7);
|
614
|
-
}
|
615
|
-
return message;
|
616
|
-
},
|
617
|
-
|
618
|
-
create(base?: DeepPartial<BalanceRequest>): BalanceRequest {
|
619
|
-
return BalanceRequest.fromPartial(base ?? {});
|
620
|
-
},
|
621
|
-
|
622
|
-
fromPartial(_: DeepPartial<BalanceRequest>): BalanceRequest {
|
623
|
-
const message = createBaseBalanceRequest();
|
624
|
-
return message;
|
625
|
-
},
|
626
|
-
};
|
627
|
-
|
628
|
-
function createBaseBalanceResponse(): BalanceResponse {
|
629
|
-
return { wei: 0, ether: 0 };
|
630
|
-
}
|
631
|
-
|
632
|
-
export const BalanceResponse = {
|
633
|
-
encode(message: BalanceResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
634
|
-
if (message.wei !== 0) {
|
635
|
-
writer.uint32(8).uint64(message.wei);
|
636
|
-
}
|
637
|
-
if (message.ether !== 0) {
|
638
|
-
writer.uint32(17).double(message.ether);
|
639
|
-
}
|
640
|
-
return writer;
|
641
|
-
},
|
642
|
-
|
643
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): BalanceResponse {
|
644
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
645
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
646
|
-
const message = createBaseBalanceResponse();
|
647
|
-
while (reader.pos < end) {
|
648
|
-
const tag = reader.uint32();
|
649
|
-
switch (tag >>> 3) {
|
650
|
-
case 1:
|
651
|
-
if (tag != 8) {
|
652
|
-
break;
|
653
|
-
}
|
654
|
-
|
655
|
-
message.wei = longToNumber(reader.uint64() as Long);
|
656
|
-
continue;
|
657
|
-
case 2:
|
658
|
-
if (tag != 17) {
|
659
|
-
break;
|
660
|
-
}
|
661
|
-
|
662
|
-
message.ether = reader.double();
|
663
|
-
continue;
|
664
|
-
}
|
665
|
-
if ((tag & 7) == 4 || tag == 0) {
|
666
|
-
break;
|
667
|
-
}
|
668
|
-
reader.skipType(tag & 7);
|
669
|
-
}
|
670
|
-
return message;
|
671
|
-
},
|
672
|
-
|
673
|
-
create(base?: DeepPartial<BalanceResponse>): BalanceResponse {
|
674
|
-
return BalanceResponse.fromPartial(base ?? {});
|
675
|
-
},
|
676
|
-
|
677
|
-
fromPartial(object: DeepPartial<BalanceResponse>): BalanceResponse {
|
678
|
-
const message = createBaseBalanceResponse();
|
679
|
-
message.wei = object.wei ?? 0;
|
680
|
-
message.ether = object.ether ?? 0;
|
681
|
-
return message;
|
682
|
-
},
|
683
|
-
};
|
684
|
-
|
685
|
-
/** The Relay Service definition. */
|
686
|
-
export type ECSRelayServiceDefinition = typeof ECSRelayServiceDefinition;
|
687
|
-
export const ECSRelayServiceDefinition = {
|
688
|
-
name: "ECSRelayService",
|
689
|
-
fullName: "ecsrelay.ECSRelayService",
|
690
|
-
methods: {
|
691
|
-
authenticate: {
|
692
|
-
name: "Authenticate",
|
693
|
-
requestType: Signature,
|
694
|
-
requestStream: false,
|
695
|
-
responseType: Identity,
|
696
|
-
responseStream: false,
|
697
|
-
options: {},
|
698
|
-
},
|
699
|
-
revoke: {
|
700
|
-
name: "Revoke",
|
701
|
-
requestType: Signature,
|
702
|
-
requestStream: false,
|
703
|
-
responseType: Identity,
|
704
|
-
responseStream: false,
|
705
|
-
options: {},
|
706
|
-
},
|
707
|
-
ping: {
|
708
|
-
name: "Ping",
|
709
|
-
requestType: Signature,
|
710
|
-
requestStream: false,
|
711
|
-
responseType: Identity,
|
712
|
-
responseStream: false,
|
713
|
-
options: {},
|
714
|
-
},
|
715
|
-
countAuthenticated: {
|
716
|
-
name: "CountAuthenticated",
|
717
|
-
requestType: CountIdentitiesRequest,
|
718
|
-
requestStream: false,
|
719
|
-
responseType: CountIdentitiesResponse,
|
720
|
-
responseStream: false,
|
721
|
-
options: {},
|
722
|
-
},
|
723
|
-
countConnected: {
|
724
|
-
name: "CountConnected",
|
725
|
-
requestType: CountIdentitiesRequest,
|
726
|
-
requestStream: false,
|
727
|
-
responseType: CountIdentitiesResponse,
|
728
|
-
responseStream: false,
|
729
|
-
options: {},
|
730
|
-
},
|
731
|
-
subscribe: {
|
732
|
-
name: "Subscribe",
|
733
|
-
requestType: SubscriptionRequest,
|
734
|
-
requestStream: false,
|
735
|
-
responseType: Subscription,
|
736
|
-
responseStream: false,
|
737
|
-
options: {},
|
738
|
-
},
|
739
|
-
unsubscribe: {
|
740
|
-
name: "Unsubscribe",
|
741
|
-
requestType: SubscriptionRequest,
|
742
|
-
requestStream: false,
|
743
|
-
responseType: Subscription,
|
744
|
-
responseStream: false,
|
745
|
-
options: {},
|
746
|
-
},
|
747
|
-
openStream: {
|
748
|
-
name: "OpenStream",
|
749
|
-
requestType: Signature,
|
750
|
-
requestStream: false,
|
751
|
-
responseType: Message,
|
752
|
-
responseStream: true,
|
753
|
-
options: {},
|
754
|
-
},
|
755
|
-
/** Push a stream of messages to be relayed. */
|
756
|
-
pushStream: {
|
757
|
-
name: "PushStream",
|
758
|
-
requestType: PushRequest,
|
759
|
-
requestStream: true,
|
760
|
-
responseType: PushResponse,
|
761
|
-
responseStream: true,
|
762
|
-
options: {},
|
763
|
-
},
|
764
|
-
/** Push a single message to be relayed. */
|
765
|
-
push: {
|
766
|
-
name: "Push",
|
767
|
-
requestType: PushRequest,
|
768
|
-
requestStream: false,
|
769
|
-
responseType: PushResponse,
|
770
|
-
responseStream: false,
|
771
|
-
options: {},
|
772
|
-
},
|
773
|
-
/** Minimum balance an account must have to be able to push. */
|
774
|
-
minBalanceForPush: {
|
775
|
-
name: "MinBalanceForPush",
|
776
|
-
requestType: BalanceRequest,
|
777
|
-
requestStream: false,
|
778
|
-
responseType: BalanceResponse,
|
779
|
-
responseStream: false,
|
780
|
-
options: {},
|
781
|
-
},
|
782
|
-
},
|
783
|
-
} as const;
|
784
|
-
|
785
|
-
export interface ECSRelayServiceImplementation<CallContextExt = {}> {
|
786
|
-
authenticate(request: Signature, context: CallContext & CallContextExt): Promise<DeepPartial<Identity>>;
|
787
|
-
revoke(request: Signature, context: CallContext & CallContextExt): Promise<DeepPartial<Identity>>;
|
788
|
-
ping(request: Signature, context: CallContext & CallContextExt): Promise<DeepPartial<Identity>>;
|
789
|
-
countAuthenticated(
|
790
|
-
request: CountIdentitiesRequest,
|
791
|
-
context: CallContext & CallContextExt
|
792
|
-
): Promise<DeepPartial<CountIdentitiesResponse>>;
|
793
|
-
countConnected(
|
794
|
-
request: CountIdentitiesRequest,
|
795
|
-
context: CallContext & CallContextExt
|
796
|
-
): Promise<DeepPartial<CountIdentitiesResponse>>;
|
797
|
-
subscribe(request: SubscriptionRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Subscription>>;
|
798
|
-
unsubscribe(request: SubscriptionRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Subscription>>;
|
799
|
-
openStream(
|
800
|
-
request: Signature,
|
801
|
-
context: CallContext & CallContextExt
|
802
|
-
): ServerStreamingMethodResult<DeepPartial<Message>>;
|
803
|
-
/** Push a stream of messages to be relayed. */
|
804
|
-
pushStream(
|
805
|
-
request: AsyncIterable<PushRequest>,
|
806
|
-
context: CallContext & CallContextExt
|
807
|
-
): ServerStreamingMethodResult<DeepPartial<PushResponse>>;
|
808
|
-
/** Push a single message to be relayed. */
|
809
|
-
push(request: PushRequest, context: CallContext & CallContextExt): Promise<DeepPartial<PushResponse>>;
|
810
|
-
/** Minimum balance an account must have to be able to push. */
|
811
|
-
minBalanceForPush(
|
812
|
-
request: BalanceRequest,
|
813
|
-
context: CallContext & CallContextExt
|
814
|
-
): Promise<DeepPartial<BalanceResponse>>;
|
815
|
-
}
|
816
|
-
|
817
|
-
export interface ECSRelayServiceClient<CallOptionsExt = {}> {
|
818
|
-
authenticate(request: DeepPartial<Signature>, options?: CallOptions & CallOptionsExt): Promise<Identity>;
|
819
|
-
revoke(request: DeepPartial<Signature>, options?: CallOptions & CallOptionsExt): Promise<Identity>;
|
820
|
-
ping(request: DeepPartial<Signature>, options?: CallOptions & CallOptionsExt): Promise<Identity>;
|
821
|
-
countAuthenticated(
|
822
|
-
request: DeepPartial<CountIdentitiesRequest>,
|
823
|
-
options?: CallOptions & CallOptionsExt
|
824
|
-
): Promise<CountIdentitiesResponse>;
|
825
|
-
countConnected(
|
826
|
-
request: DeepPartial<CountIdentitiesRequest>,
|
827
|
-
options?: CallOptions & CallOptionsExt
|
828
|
-
): Promise<CountIdentitiesResponse>;
|
829
|
-
subscribe(request: DeepPartial<SubscriptionRequest>, options?: CallOptions & CallOptionsExt): Promise<Subscription>;
|
830
|
-
unsubscribe(request: DeepPartial<SubscriptionRequest>, options?: CallOptions & CallOptionsExt): Promise<Subscription>;
|
831
|
-
openStream(request: DeepPartial<Signature>, options?: CallOptions & CallOptionsExt): AsyncIterable<Message>;
|
832
|
-
/** Push a stream of messages to be relayed. */
|
833
|
-
pushStream(
|
834
|
-
request: AsyncIterable<DeepPartial<PushRequest>>,
|
835
|
-
options?: CallOptions & CallOptionsExt
|
836
|
-
): AsyncIterable<PushResponse>;
|
837
|
-
/** Push a single message to be relayed. */
|
838
|
-
push(request: DeepPartial<PushRequest>, options?: CallOptions & CallOptionsExt): Promise<PushResponse>;
|
839
|
-
/** Minimum balance an account must have to be able to push. */
|
840
|
-
minBalanceForPush(
|
841
|
-
request: DeepPartial<BalanceRequest>,
|
842
|
-
options?: CallOptions & CallOptionsExt
|
843
|
-
): Promise<BalanceResponse>;
|
844
|
-
}
|
845
|
-
|
846
|
-
declare var self: any | undefined;
|
847
|
-
declare var window: any | undefined;
|
848
|
-
declare var global: any | undefined;
|
849
|
-
var tsProtoGlobalThis: any = (() => {
|
850
|
-
if (typeof globalThis !== "undefined") {
|
851
|
-
return globalThis;
|
852
|
-
}
|
853
|
-
if (typeof self !== "undefined") {
|
854
|
-
return self;
|
855
|
-
}
|
856
|
-
if (typeof window !== "undefined") {
|
857
|
-
return window;
|
858
|
-
}
|
859
|
-
if (typeof global !== "undefined") {
|
860
|
-
return global;
|
861
|
-
}
|
862
|
-
throw "Unable to locate global object";
|
863
|
-
})();
|
864
|
-
|
865
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
866
|
-
|
867
|
-
export type DeepPartial<T> = T extends Builtin
|
868
|
-
? T
|
869
|
-
: T extends Array<infer U>
|
870
|
-
? Array<DeepPartial<U>>
|
871
|
-
: T extends ReadonlyArray<infer U>
|
872
|
-
? ReadonlyArray<DeepPartial<U>>
|
873
|
-
: T extends {}
|
874
|
-
? { [K in keyof T]?: DeepPartial<T[K]> }
|
875
|
-
: Partial<T>;
|
876
|
-
|
877
|
-
function longToNumber(long: Long): number {
|
878
|
-
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
879
|
-
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
880
|
-
}
|
881
|
-
return long.toNumber();
|
882
|
-
}
|
883
|
-
|
884
|
-
if (_m0.util.Long !== Long) {
|
885
|
-
_m0.util.Long = Long as any;
|
886
|
-
_m0.configure();
|
887
|
-
}
|
888
|
-
|
889
|
-
export type ServerStreamingMethodResult<Response> = { [Symbol.asyncIterator](): AsyncIterator<Response, void> };
|