@latticexyz/services 2.0.0-alpha.49 → 2.0.0-alpha.5
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 +6 -7
- package/protobuf/ts/ecs-relay/ecs-relay.ts +202 -70
- package/protobuf/ts/ecs-snapshot/ecs-snapshot.ts +267 -83
- package/protobuf/ts/ecs-stream/ecs-stream.ts +145 -41
- package/protobuf/ts/faucet/faucet.ts +292 -99
- package/protobuf/ts/mode/mode.ts +531 -162
package/bin/ecs-relay
CHANGED
|
Binary file
|
package/bin/ecs-snapshot
CHANGED
|
Binary file
|
package/bin/ecs-stream
CHANGED
|
Binary file
|
package/bin/faucet
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@latticexyz/services",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.5+01167ab3",
|
|
5
5
|
"description": "MUD services for enhanced interactions with on-chain ECS state",
|
|
6
6
|
"main": "protobuf/ts/index.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -11,21 +11,20 @@
|
|
|
11
11
|
"directory": "packages/services"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
|
-
"
|
|
14
|
+
"build": "make build",
|
|
15
15
|
"docs": "rimraf API && mkdir -p _docs/pkg && find pkg -type f -name '*.go' -exec bash -c 'gomarkdoc {} > \"$(dirname _docs/{})\".md' \\; && mv _docs/pkg API && rimraf _docs",
|
|
16
16
|
"test": "tsc --noEmit && echo 'todo: add tests'",
|
|
17
17
|
"protoc-ts": "make protoc-ts",
|
|
18
|
-
"link": "yarn link",
|
|
19
18
|
"release": "npm publish --access=public"
|
|
20
19
|
},
|
|
21
20
|
"devDependencies": {
|
|
22
21
|
"rimraf": "^3.0.2",
|
|
23
|
-
"ts-proto": "^1.
|
|
22
|
+
"ts-proto": "^1.146.0"
|
|
24
23
|
},
|
|
25
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "01167ab366c9e677fd84161401c07e44066f5f03",
|
|
26
25
|
"dependencies": {
|
|
27
26
|
"long": "^5.2.1",
|
|
28
|
-
"nice-grpc-common": "^2.0.
|
|
29
|
-
"protobufjs": "^7.
|
|
27
|
+
"nice-grpc-common": "^2.0.2",
|
|
28
|
+
"protobufjs": "^7.2.3"
|
|
30
29
|
}
|
|
31
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import Long from "long";
|
|
3
|
-
import { CallContext, CallOptions } from "nice-grpc-common";
|
|
3
|
+
import type { CallContext, CallOptions } from "nice-grpc-common";
|
|
4
4
|
import _m0 from "protobufjs/minimal";
|
|
5
5
|
|
|
6
6
|
export const protobufPackage = "ecsrelay";
|
|
@@ -71,23 +71,32 @@ export const Identity = {
|
|
|
71
71
|
},
|
|
72
72
|
|
|
73
73
|
decode(input: _m0.Reader | Uint8Array, length?: number): Identity {
|
|
74
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
74
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
75
75
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
76
76
|
const message = createBaseIdentity();
|
|
77
77
|
while (reader.pos < end) {
|
|
78
78
|
const tag = reader.uint32();
|
|
79
79
|
switch (tag >>> 3) {
|
|
80
80
|
case 1:
|
|
81
|
+
if (tag != 10) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
|
|
81
85
|
message.name = reader.string();
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
89
|
+
break;
|
|
86
90
|
}
|
|
91
|
+
reader.skipType(tag & 7);
|
|
87
92
|
}
|
|
88
93
|
return message;
|
|
89
94
|
},
|
|
90
95
|
|
|
96
|
+
create(base?: DeepPartial<Identity>): Identity {
|
|
97
|
+
return Identity.fromPartial(base ?? {});
|
|
98
|
+
},
|
|
99
|
+
|
|
91
100
|
fromPartial(object: DeepPartial<Identity>): Identity {
|
|
92
101
|
const message = createBaseIdentity();
|
|
93
102
|
message.name = object.name ?? "";
|
|
@@ -108,23 +117,32 @@ export const Signature = {
|
|
|
108
117
|
},
|
|
109
118
|
|
|
110
119
|
decode(input: _m0.Reader | Uint8Array, length?: number): Signature {
|
|
111
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
120
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
112
121
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
113
122
|
const message = createBaseSignature();
|
|
114
123
|
while (reader.pos < end) {
|
|
115
124
|
const tag = reader.uint32();
|
|
116
125
|
switch (tag >>> 3) {
|
|
117
126
|
case 1:
|
|
127
|
+
if (tag != 10) {
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
|
|
118
131
|
message.signature = reader.string();
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
135
|
+
break;
|
|
123
136
|
}
|
|
137
|
+
reader.skipType(tag & 7);
|
|
124
138
|
}
|
|
125
139
|
return message;
|
|
126
140
|
},
|
|
127
141
|
|
|
142
|
+
create(base?: DeepPartial<Signature>): Signature {
|
|
143
|
+
return Signature.fromPartial(base ?? {});
|
|
144
|
+
},
|
|
145
|
+
|
|
128
146
|
fromPartial(object: DeepPartial<Signature>): Signature {
|
|
129
147
|
const message = createBaseSignature();
|
|
130
148
|
message.signature = object.signature ?? "";
|
|
@@ -157,35 +175,60 @@ export const Message = {
|
|
|
157
175
|
},
|
|
158
176
|
|
|
159
177
|
decode(input: _m0.Reader | Uint8Array, length?: number): Message {
|
|
160
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
178
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
161
179
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
162
180
|
const message = createBaseMessage();
|
|
163
181
|
while (reader.pos < end) {
|
|
164
182
|
const tag = reader.uint32();
|
|
165
183
|
switch (tag >>> 3) {
|
|
166
184
|
case 1:
|
|
185
|
+
if (tag != 8) {
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
|
|
167
189
|
message.version = reader.uint32();
|
|
168
|
-
|
|
190
|
+
continue;
|
|
169
191
|
case 2:
|
|
192
|
+
if (tag != 18) {
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
|
|
170
196
|
message.id = reader.string();
|
|
171
|
-
|
|
197
|
+
continue;
|
|
172
198
|
case 3:
|
|
199
|
+
if (tag != 26) {
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
|
|
173
203
|
message.data = reader.bytes();
|
|
174
|
-
|
|
204
|
+
continue;
|
|
175
205
|
case 4:
|
|
206
|
+
if (tag != 32) {
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
|
|
176
210
|
message.timestamp = longToNumber(reader.int64() as Long);
|
|
177
|
-
|
|
211
|
+
continue;
|
|
178
212
|
case 5:
|
|
213
|
+
if (tag != 42) {
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
|
|
179
217
|
message.signature = reader.string();
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
221
|
+
break;
|
|
184
222
|
}
|
|
223
|
+
reader.skipType(tag & 7);
|
|
185
224
|
}
|
|
186
225
|
return message;
|
|
187
226
|
},
|
|
188
227
|
|
|
228
|
+
create(base?: DeepPartial<Message>): Message {
|
|
229
|
+
return Message.fromPartial(base ?? {});
|
|
230
|
+
},
|
|
231
|
+
|
|
189
232
|
fromPartial(object: DeepPartial<Message>): Message {
|
|
190
233
|
const message = createBaseMessage();
|
|
191
234
|
message.version = object.version ?? 0;
|
|
@@ -213,26 +256,39 @@ export const SubscriptionRequest = {
|
|
|
213
256
|
},
|
|
214
257
|
|
|
215
258
|
decode(input: _m0.Reader | Uint8Array, length?: number): SubscriptionRequest {
|
|
216
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
259
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
217
260
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
218
261
|
const message = createBaseSubscriptionRequest();
|
|
219
262
|
while (reader.pos < end) {
|
|
220
263
|
const tag = reader.uint32();
|
|
221
264
|
switch (tag >>> 3) {
|
|
222
265
|
case 1:
|
|
266
|
+
if (tag != 10) {
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
|
|
223
270
|
message.signature = Signature.decode(reader, reader.uint32());
|
|
224
|
-
|
|
271
|
+
continue;
|
|
225
272
|
case 2:
|
|
273
|
+
if (tag != 18) {
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
|
|
226
277
|
message.subscription = Subscription.decode(reader, reader.uint32());
|
|
227
|
-
|
|
228
|
-
default:
|
|
229
|
-
reader.skipType(tag & 7);
|
|
230
|
-
break;
|
|
278
|
+
continue;
|
|
231
279
|
}
|
|
280
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
reader.skipType(tag & 7);
|
|
232
284
|
}
|
|
233
285
|
return message;
|
|
234
286
|
},
|
|
235
287
|
|
|
288
|
+
create(base?: DeepPartial<SubscriptionRequest>): SubscriptionRequest {
|
|
289
|
+
return SubscriptionRequest.fromPartial(base ?? {});
|
|
290
|
+
},
|
|
291
|
+
|
|
236
292
|
fromPartial(object: DeepPartial<SubscriptionRequest>): SubscriptionRequest {
|
|
237
293
|
const message = createBaseSubscriptionRequest();
|
|
238
294
|
message.signature =
|
|
@@ -258,23 +314,32 @@ export const Subscription = {
|
|
|
258
314
|
},
|
|
259
315
|
|
|
260
316
|
decode(input: _m0.Reader | Uint8Array, length?: number): Subscription {
|
|
261
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
317
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
262
318
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
263
319
|
const message = createBaseSubscription();
|
|
264
320
|
while (reader.pos < end) {
|
|
265
321
|
const tag = reader.uint32();
|
|
266
322
|
switch (tag >>> 3) {
|
|
267
323
|
case 1:
|
|
324
|
+
if (tag != 10) {
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
|
|
268
328
|
message.label = reader.string();
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
329
|
+
continue;
|
|
330
|
+
}
|
|
331
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
332
|
+
break;
|
|
273
333
|
}
|
|
334
|
+
reader.skipType(tag & 7);
|
|
274
335
|
}
|
|
275
336
|
return message;
|
|
276
337
|
},
|
|
277
338
|
|
|
339
|
+
create(base?: DeepPartial<Subscription>): Subscription {
|
|
340
|
+
return Subscription.fromPartial(base ?? {});
|
|
341
|
+
},
|
|
342
|
+
|
|
278
343
|
fromPartial(object: DeepPartial<Subscription>): Subscription {
|
|
279
344
|
const message = createBaseSubscription();
|
|
280
345
|
message.label = object.label ?? "";
|
|
@@ -298,26 +363,39 @@ export const PushRequest = {
|
|
|
298
363
|
},
|
|
299
364
|
|
|
300
365
|
decode(input: _m0.Reader | Uint8Array, length?: number): PushRequest {
|
|
301
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
366
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
302
367
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
303
368
|
const message = createBasePushRequest();
|
|
304
369
|
while (reader.pos < end) {
|
|
305
370
|
const tag = reader.uint32();
|
|
306
371
|
switch (tag >>> 3) {
|
|
307
372
|
case 1:
|
|
373
|
+
if (tag != 10) {
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
|
|
308
377
|
message.label = reader.string();
|
|
309
|
-
|
|
378
|
+
continue;
|
|
310
379
|
case 2:
|
|
380
|
+
if (tag != 18) {
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
|
|
311
384
|
message.message = Message.decode(reader, reader.uint32());
|
|
312
|
-
|
|
313
|
-
default:
|
|
314
|
-
reader.skipType(tag & 7);
|
|
315
|
-
break;
|
|
385
|
+
continue;
|
|
316
386
|
}
|
|
387
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
reader.skipType(tag & 7);
|
|
317
391
|
}
|
|
318
392
|
return message;
|
|
319
393
|
},
|
|
320
394
|
|
|
395
|
+
create(base?: DeepPartial<PushRequest>): PushRequest {
|
|
396
|
+
return PushRequest.fromPartial(base ?? {});
|
|
397
|
+
},
|
|
398
|
+
|
|
321
399
|
fromPartial(object: DeepPartial<PushRequest>): PushRequest {
|
|
322
400
|
const message = createBasePushRequest();
|
|
323
401
|
message.label = object.label ?? "";
|
|
@@ -346,29 +424,46 @@ export const PushManyRequest = {
|
|
|
346
424
|
},
|
|
347
425
|
|
|
348
426
|
decode(input: _m0.Reader | Uint8Array, length?: number): PushManyRequest {
|
|
349
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
427
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
350
428
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
351
429
|
const message = createBasePushManyRequest();
|
|
352
430
|
while (reader.pos < end) {
|
|
353
431
|
const tag = reader.uint32();
|
|
354
432
|
switch (tag >>> 3) {
|
|
355
433
|
case 1:
|
|
434
|
+
if (tag != 10) {
|
|
435
|
+
break;
|
|
436
|
+
}
|
|
437
|
+
|
|
356
438
|
message.signature = Signature.decode(reader, reader.uint32());
|
|
357
|
-
|
|
439
|
+
continue;
|
|
358
440
|
case 2:
|
|
441
|
+
if (tag != 18) {
|
|
442
|
+
break;
|
|
443
|
+
}
|
|
444
|
+
|
|
359
445
|
message.label = reader.string();
|
|
360
|
-
|
|
446
|
+
continue;
|
|
361
447
|
case 3:
|
|
448
|
+
if (tag != 26) {
|
|
449
|
+
break;
|
|
450
|
+
}
|
|
451
|
+
|
|
362
452
|
message.messages.push(Message.decode(reader, reader.uint32()));
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
456
|
+
break;
|
|
367
457
|
}
|
|
458
|
+
reader.skipType(tag & 7);
|
|
368
459
|
}
|
|
369
460
|
return message;
|
|
370
461
|
},
|
|
371
462
|
|
|
463
|
+
create(base?: DeepPartial<PushManyRequest>): PushManyRequest {
|
|
464
|
+
return PushManyRequest.fromPartial(base ?? {});
|
|
465
|
+
},
|
|
466
|
+
|
|
372
467
|
fromPartial(object: DeepPartial<PushManyRequest>): PushManyRequest {
|
|
373
468
|
const message = createBasePushManyRequest();
|
|
374
469
|
message.signature =
|
|
@@ -389,20 +484,25 @@ export const PushResponse = {
|
|
|
389
484
|
},
|
|
390
485
|
|
|
391
486
|
decode(input: _m0.Reader | Uint8Array, length?: number): PushResponse {
|
|
392
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
487
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
393
488
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
394
489
|
const message = createBasePushResponse();
|
|
395
490
|
while (reader.pos < end) {
|
|
396
491
|
const tag = reader.uint32();
|
|
397
492
|
switch (tag >>> 3) {
|
|
398
|
-
default:
|
|
399
|
-
reader.skipType(tag & 7);
|
|
400
|
-
break;
|
|
401
493
|
}
|
|
494
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
reader.skipType(tag & 7);
|
|
402
498
|
}
|
|
403
499
|
return message;
|
|
404
500
|
},
|
|
405
501
|
|
|
502
|
+
create(base?: DeepPartial<PushResponse>): PushResponse {
|
|
503
|
+
return PushResponse.fromPartial(base ?? {});
|
|
504
|
+
},
|
|
505
|
+
|
|
406
506
|
fromPartial(_: DeepPartial<PushResponse>): PushResponse {
|
|
407
507
|
const message = createBasePushResponse();
|
|
408
508
|
return message;
|
|
@@ -419,20 +519,25 @@ export const CountIdentitiesRequest = {
|
|
|
419
519
|
},
|
|
420
520
|
|
|
421
521
|
decode(input: _m0.Reader | Uint8Array, length?: number): CountIdentitiesRequest {
|
|
422
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
522
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
423
523
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
424
524
|
const message = createBaseCountIdentitiesRequest();
|
|
425
525
|
while (reader.pos < end) {
|
|
426
526
|
const tag = reader.uint32();
|
|
427
527
|
switch (tag >>> 3) {
|
|
428
|
-
default:
|
|
429
|
-
reader.skipType(tag & 7);
|
|
430
|
-
break;
|
|
431
528
|
}
|
|
529
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
530
|
+
break;
|
|
531
|
+
}
|
|
532
|
+
reader.skipType(tag & 7);
|
|
432
533
|
}
|
|
433
534
|
return message;
|
|
434
535
|
},
|
|
435
536
|
|
|
537
|
+
create(base?: DeepPartial<CountIdentitiesRequest>): CountIdentitiesRequest {
|
|
538
|
+
return CountIdentitiesRequest.fromPartial(base ?? {});
|
|
539
|
+
},
|
|
540
|
+
|
|
436
541
|
fromPartial(_: DeepPartial<CountIdentitiesRequest>): CountIdentitiesRequest {
|
|
437
542
|
const message = createBaseCountIdentitiesRequest();
|
|
438
543
|
return message;
|
|
@@ -452,23 +557,32 @@ export const CountIdentitiesResponse = {
|
|
|
452
557
|
},
|
|
453
558
|
|
|
454
559
|
decode(input: _m0.Reader | Uint8Array, length?: number): CountIdentitiesResponse {
|
|
455
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
560
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
456
561
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
457
562
|
const message = createBaseCountIdentitiesResponse();
|
|
458
563
|
while (reader.pos < end) {
|
|
459
564
|
const tag = reader.uint32();
|
|
460
565
|
switch (tag >>> 3) {
|
|
461
566
|
case 1:
|
|
567
|
+
if (tag != 8) {
|
|
568
|
+
break;
|
|
569
|
+
}
|
|
570
|
+
|
|
462
571
|
message.count = reader.uint32();
|
|
463
|
-
|
|
464
|
-
default:
|
|
465
|
-
reader.skipType(tag & 7);
|
|
466
|
-
break;
|
|
572
|
+
continue;
|
|
467
573
|
}
|
|
574
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
575
|
+
break;
|
|
576
|
+
}
|
|
577
|
+
reader.skipType(tag & 7);
|
|
468
578
|
}
|
|
469
579
|
return message;
|
|
470
580
|
},
|
|
471
581
|
|
|
582
|
+
create(base?: DeepPartial<CountIdentitiesResponse>): CountIdentitiesResponse {
|
|
583
|
+
return CountIdentitiesResponse.fromPartial(base ?? {});
|
|
584
|
+
},
|
|
585
|
+
|
|
472
586
|
fromPartial(object: DeepPartial<CountIdentitiesResponse>): CountIdentitiesResponse {
|
|
473
587
|
const message = createBaseCountIdentitiesResponse();
|
|
474
588
|
message.count = object.count ?? 0;
|
|
@@ -486,20 +600,25 @@ export const BalanceRequest = {
|
|
|
486
600
|
},
|
|
487
601
|
|
|
488
602
|
decode(input: _m0.Reader | Uint8Array, length?: number): BalanceRequest {
|
|
489
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
603
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
490
604
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
491
605
|
const message = createBaseBalanceRequest();
|
|
492
606
|
while (reader.pos < end) {
|
|
493
607
|
const tag = reader.uint32();
|
|
494
608
|
switch (tag >>> 3) {
|
|
495
|
-
default:
|
|
496
|
-
reader.skipType(tag & 7);
|
|
497
|
-
break;
|
|
498
609
|
}
|
|
610
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
611
|
+
break;
|
|
612
|
+
}
|
|
613
|
+
reader.skipType(tag & 7);
|
|
499
614
|
}
|
|
500
615
|
return message;
|
|
501
616
|
},
|
|
502
617
|
|
|
618
|
+
create(base?: DeepPartial<BalanceRequest>): BalanceRequest {
|
|
619
|
+
return BalanceRequest.fromPartial(base ?? {});
|
|
620
|
+
},
|
|
621
|
+
|
|
503
622
|
fromPartial(_: DeepPartial<BalanceRequest>): BalanceRequest {
|
|
504
623
|
const message = createBaseBalanceRequest();
|
|
505
624
|
return message;
|
|
@@ -522,26 +641,39 @@ export const BalanceResponse = {
|
|
|
522
641
|
},
|
|
523
642
|
|
|
524
643
|
decode(input: _m0.Reader | Uint8Array, length?: number): BalanceResponse {
|
|
525
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
644
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
526
645
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
527
646
|
const message = createBaseBalanceResponse();
|
|
528
647
|
while (reader.pos < end) {
|
|
529
648
|
const tag = reader.uint32();
|
|
530
649
|
switch (tag >>> 3) {
|
|
531
650
|
case 1:
|
|
651
|
+
if (tag != 8) {
|
|
652
|
+
break;
|
|
653
|
+
}
|
|
654
|
+
|
|
532
655
|
message.wei = longToNumber(reader.uint64() as Long);
|
|
533
|
-
|
|
656
|
+
continue;
|
|
534
657
|
case 2:
|
|
658
|
+
if (tag != 17) {
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
661
|
+
|
|
535
662
|
message.ether = reader.double();
|
|
536
|
-
|
|
537
|
-
default:
|
|
538
|
-
reader.skipType(tag & 7);
|
|
539
|
-
break;
|
|
663
|
+
continue;
|
|
540
664
|
}
|
|
665
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
666
|
+
break;
|
|
667
|
+
}
|
|
668
|
+
reader.skipType(tag & 7);
|
|
541
669
|
}
|
|
542
670
|
return message;
|
|
543
671
|
},
|
|
544
672
|
|
|
673
|
+
create(base?: DeepPartial<BalanceResponse>): BalanceResponse {
|
|
674
|
+
return BalanceResponse.fromPartial(base ?? {});
|
|
675
|
+
},
|
|
676
|
+
|
|
545
677
|
fromPartial(object: DeepPartial<BalanceResponse>): BalanceResponse {
|
|
546
678
|
const message = createBaseBalanceResponse();
|
|
547
679
|
message.wei = object.wei ?? 0;
|
|
@@ -650,7 +782,7 @@ export const ECSRelayServiceDefinition = {
|
|
|
650
782
|
},
|
|
651
783
|
} as const;
|
|
652
784
|
|
|
653
|
-
export interface
|
|
785
|
+
export interface ECSRelayServiceImplementation<CallContextExt = {}> {
|
|
654
786
|
authenticate(request: Signature, context: CallContext & CallContextExt): Promise<DeepPartial<Identity>>;
|
|
655
787
|
revoke(request: Signature, context: CallContext & CallContextExt): Promise<DeepPartial<Identity>>;
|
|
656
788
|
ping(request: Signature, context: CallContext & CallContextExt): Promise<DeepPartial<Identity>>;
|
|
@@ -714,7 +846,7 @@ export interface ECSRelayServiceClient<CallOptionsExt = {}> {
|
|
|
714
846
|
declare var self: any | undefined;
|
|
715
847
|
declare var window: any | undefined;
|
|
716
848
|
declare var global: any | undefined;
|
|
717
|
-
var
|
|
849
|
+
var tsProtoGlobalThis: any = (() => {
|
|
718
850
|
if (typeof globalThis !== "undefined") {
|
|
719
851
|
return globalThis;
|
|
720
852
|
}
|
|
@@ -744,7 +876,7 @@ export type DeepPartial<T> = T extends Builtin
|
|
|
744
876
|
|
|
745
877
|
function longToNumber(long: Long): number {
|
|
746
878
|
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
747
|
-
throw new
|
|
879
|
+
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
748
880
|
}
|
|
749
881
|
return long.toNumber();
|
|
750
882
|
}
|