@latticexyz/services 1.42.0 → 1.43.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 +114 -88
- package/bin/ecs-relay +0 -0
- package/bin/ecs-snapshot +0 -0
- package/bin/ecs-stream +0 -0
- package/bin/faucet +0 -0
- package/bin/mode +0 -0
- package/package.json +9 -10
- package/protobuf/ts/ecs-relay/ecs-relay.ts +70 -202
- package/protobuf/ts/ecs-snapshot/ecs-snapshot.ts +83 -267
- package/protobuf/ts/ecs-stream/ecs-stream.ts +41 -145
- package/protobuf/ts/faucet/faucet.ts +99 -292
- package/LICENSE +0 -21
- package/README.v1.md +0 -119
- package/protobuf/go/mode/mode.pb.go +0 -1773
- package/protobuf/go/mode/mode_grpc.pb.go +0 -276
- package/protobuf/ts/mode/mode.ts +0 -1878
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import Long from "long";
|
|
3
|
-
import
|
|
3
|
+
import { CallContext, CallOptions } from "nice-grpc-common";
|
|
4
4
|
import _m0 from "protobufjs/minimal";
|
|
5
5
|
|
|
6
6
|
export const protobufPackage = "ecssnapshot";
|
|
@@ -97,46 +97,29 @@ export const ECSState = {
|
|
|
97
97
|
},
|
|
98
98
|
|
|
99
99
|
decode(input: _m0.Reader | Uint8Array, length?: number): ECSState {
|
|
100
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader
|
|
100
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
101
101
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
102
102
|
const message = createBaseECSState();
|
|
103
103
|
while (reader.pos < end) {
|
|
104
104
|
const tag = reader.uint32();
|
|
105
105
|
switch (tag >>> 3) {
|
|
106
106
|
case 1:
|
|
107
|
-
if (tag != 8) {
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
107
|
message.componentIdIdx = reader.uint32();
|
|
112
|
-
|
|
108
|
+
break;
|
|
113
109
|
case 2:
|
|
114
|
-
if (tag != 16) {
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
110
|
message.entityIdIdx = reader.uint32();
|
|
119
|
-
|
|
111
|
+
break;
|
|
120
112
|
case 3:
|
|
121
|
-
if (tag != 26) {
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
113
|
message.value = reader.bytes();
|
|
126
|
-
|
|
114
|
+
break;
|
|
115
|
+
default:
|
|
116
|
+
reader.skipType(tag & 7);
|
|
117
|
+
break;
|
|
127
118
|
}
|
|
128
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
129
|
-
break;
|
|
130
|
-
}
|
|
131
|
-
reader.skipType(tag & 7);
|
|
132
119
|
}
|
|
133
120
|
return message;
|
|
134
121
|
},
|
|
135
122
|
|
|
136
|
-
create(base?: DeepPartial<ECSState>): ECSState {
|
|
137
|
-
return ECSState.fromPartial(base ?? {});
|
|
138
|
-
},
|
|
139
|
-
|
|
140
123
|
fromPartial(object: DeepPartial<ECSState>): ECSState {
|
|
141
124
|
const message = createBaseECSState();
|
|
142
125
|
message.componentIdIdx = object.componentIdIdx ?? 0;
|
|
@@ -185,74 +168,41 @@ export const ECSStateSnapshot = {
|
|
|
185
168
|
},
|
|
186
169
|
|
|
187
170
|
decode(input: _m0.Reader | Uint8Array, length?: number): ECSStateSnapshot {
|
|
188
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader
|
|
171
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
189
172
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
190
173
|
const message = createBaseECSStateSnapshot();
|
|
191
174
|
while (reader.pos < end) {
|
|
192
175
|
const tag = reader.uint32();
|
|
193
176
|
switch (tag >>> 3) {
|
|
194
177
|
case 1:
|
|
195
|
-
if (tag != 10) {
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
178
|
message.state.push(ECSState.decode(reader, reader.uint32()));
|
|
200
|
-
|
|
179
|
+
break;
|
|
201
180
|
case 2:
|
|
202
|
-
if (tag != 18) {
|
|
203
|
-
break;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
181
|
message.stateComponents.push(reader.string());
|
|
207
|
-
|
|
182
|
+
break;
|
|
208
183
|
case 3:
|
|
209
|
-
if (tag != 26) {
|
|
210
|
-
break;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
184
|
message.stateEntities.push(reader.string());
|
|
214
|
-
|
|
185
|
+
break;
|
|
215
186
|
case 4:
|
|
216
|
-
if (tag != 34) {
|
|
217
|
-
break;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
187
|
message.stateHash = reader.string();
|
|
221
|
-
|
|
188
|
+
break;
|
|
222
189
|
case 5:
|
|
223
|
-
if (tag != 40) {
|
|
224
|
-
break;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
190
|
message.startBlockNumber = reader.uint32();
|
|
228
|
-
|
|
191
|
+
break;
|
|
229
192
|
case 6:
|
|
230
|
-
if (tag != 48) {
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
193
|
message.endBlockNumber = reader.uint32();
|
|
235
|
-
|
|
194
|
+
break;
|
|
236
195
|
case 7:
|
|
237
|
-
if (tag != 58) {
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
196
|
message.worldAddress = reader.string();
|
|
242
|
-
|
|
197
|
+
break;
|
|
198
|
+
default:
|
|
199
|
+
reader.skipType(tag & 7);
|
|
200
|
+
break;
|
|
243
201
|
}
|
|
244
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
reader.skipType(tag & 7);
|
|
248
202
|
}
|
|
249
203
|
return message;
|
|
250
204
|
},
|
|
251
205
|
|
|
252
|
-
create(base?: DeepPartial<ECSStateSnapshot>): ECSStateSnapshot {
|
|
253
|
-
return ECSStateSnapshot.fromPartial(base ?? {});
|
|
254
|
-
},
|
|
255
|
-
|
|
256
206
|
fromPartial(object: DeepPartial<ECSStateSnapshot>): ECSStateSnapshot {
|
|
257
207
|
const message = createBaseECSStateSnapshot();
|
|
258
208
|
message.state = object.state?.map((e) => ECSState.fromPartial(e)) || [];
|
|
@@ -279,32 +229,23 @@ export const Worlds = {
|
|
|
279
229
|
},
|
|
280
230
|
|
|
281
231
|
decode(input: _m0.Reader | Uint8Array, length?: number): Worlds {
|
|
282
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader
|
|
232
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
283
233
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
284
234
|
const message = createBaseWorlds();
|
|
285
235
|
while (reader.pos < end) {
|
|
286
236
|
const tag = reader.uint32();
|
|
287
237
|
switch (tag >>> 3) {
|
|
288
238
|
case 1:
|
|
289
|
-
if (tag != 10) {
|
|
290
|
-
break;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
239
|
message.worldAddress.push(reader.string());
|
|
294
|
-
|
|
240
|
+
break;
|
|
241
|
+
default:
|
|
242
|
+
reader.skipType(tag & 7);
|
|
243
|
+
break;
|
|
295
244
|
}
|
|
296
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
297
|
-
break;
|
|
298
|
-
}
|
|
299
|
-
reader.skipType(tag & 7);
|
|
300
245
|
}
|
|
301
246
|
return message;
|
|
302
247
|
},
|
|
303
248
|
|
|
304
|
-
create(base?: DeepPartial<Worlds>): Worlds {
|
|
305
|
-
return Worlds.fromPartial(base ?? {});
|
|
306
|
-
},
|
|
307
|
-
|
|
308
249
|
fromPartial(object: DeepPartial<Worlds>): Worlds {
|
|
309
250
|
const message = createBaseWorlds();
|
|
310
251
|
message.worldAddress = object.worldAddress?.map((e) => e) || [];
|
|
@@ -325,32 +266,23 @@ export const ECSStateRequestLatest = {
|
|
|
325
266
|
},
|
|
326
267
|
|
|
327
268
|
decode(input: _m0.Reader | Uint8Array, length?: number): ECSStateRequestLatest {
|
|
328
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader
|
|
269
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
329
270
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
330
271
|
const message = createBaseECSStateRequestLatest();
|
|
331
272
|
while (reader.pos < end) {
|
|
332
273
|
const tag = reader.uint32();
|
|
333
274
|
switch (tag >>> 3) {
|
|
334
275
|
case 1:
|
|
335
|
-
if (tag != 10) {
|
|
336
|
-
break;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
276
|
message.worldAddress = reader.string();
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
277
|
+
break;
|
|
278
|
+
default:
|
|
279
|
+
reader.skipType(tag & 7);
|
|
280
|
+
break;
|
|
344
281
|
}
|
|
345
|
-
reader.skipType(tag & 7);
|
|
346
282
|
}
|
|
347
283
|
return message;
|
|
348
284
|
},
|
|
349
285
|
|
|
350
|
-
create(base?: DeepPartial<ECSStateRequestLatest>): ECSStateRequestLatest {
|
|
351
|
-
return ECSStateRequestLatest.fromPartial(base ?? {});
|
|
352
|
-
},
|
|
353
|
-
|
|
354
286
|
fromPartial(object: DeepPartial<ECSStateRequestLatest>): ECSStateRequestLatest {
|
|
355
287
|
const message = createBaseECSStateRequestLatest();
|
|
356
288
|
message.worldAddress = object.worldAddress ?? "";
|
|
@@ -380,53 +312,32 @@ export const ECSStateRequestLatestStreamPruned = {
|
|
|
380
312
|
},
|
|
381
313
|
|
|
382
314
|
decode(input: _m0.Reader | Uint8Array, length?: number): ECSStateRequestLatestStreamPruned {
|
|
383
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader
|
|
315
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
384
316
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
385
317
|
const message = createBaseECSStateRequestLatestStreamPruned();
|
|
386
318
|
while (reader.pos < end) {
|
|
387
319
|
const tag = reader.uint32();
|
|
388
320
|
switch (tag >>> 3) {
|
|
389
321
|
case 1:
|
|
390
|
-
if (tag != 10) {
|
|
391
|
-
break;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
322
|
message.worldAddress = reader.string();
|
|
395
|
-
|
|
323
|
+
break;
|
|
396
324
|
case 2:
|
|
397
|
-
if (tag != 18) {
|
|
398
|
-
break;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
325
|
message.pruneAddress = reader.string();
|
|
402
|
-
|
|
326
|
+
break;
|
|
403
327
|
case 3:
|
|
404
|
-
if (tag != 26) {
|
|
405
|
-
break;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
328
|
message.pruneComponentId = reader.string();
|
|
409
|
-
|
|
329
|
+
break;
|
|
410
330
|
case 4:
|
|
411
|
-
if (tag != 32) {
|
|
412
|
-
break;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
331
|
message.chunkPercentage = reader.uint32();
|
|
416
|
-
|
|
332
|
+
break;
|
|
333
|
+
default:
|
|
334
|
+
reader.skipType(tag & 7);
|
|
335
|
+
break;
|
|
417
336
|
}
|
|
418
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
419
|
-
break;
|
|
420
|
-
}
|
|
421
|
-
reader.skipType(tag & 7);
|
|
422
337
|
}
|
|
423
338
|
return message;
|
|
424
339
|
},
|
|
425
340
|
|
|
426
|
-
create(base?: DeepPartial<ECSStateRequestLatestStreamPruned>): ECSStateRequestLatestStreamPruned {
|
|
427
|
-
return ECSStateRequestLatestStreamPruned.fromPartial(base ?? {});
|
|
428
|
-
},
|
|
429
|
-
|
|
430
341
|
fromPartial(object: DeepPartial<ECSStateRequestLatestStreamPruned>): ECSStateRequestLatestStreamPruned {
|
|
431
342
|
const message = createBaseECSStateRequestLatestStreamPruned();
|
|
432
343
|
message.worldAddress = object.worldAddress ?? "";
|
|
@@ -453,39 +364,26 @@ export const ECSStateRequestLatestStream = {
|
|
|
453
364
|
},
|
|
454
365
|
|
|
455
366
|
decode(input: _m0.Reader | Uint8Array, length?: number): ECSStateRequestLatestStream {
|
|
456
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader
|
|
367
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
457
368
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
458
369
|
const message = createBaseECSStateRequestLatestStream();
|
|
459
370
|
while (reader.pos < end) {
|
|
460
371
|
const tag = reader.uint32();
|
|
461
372
|
switch (tag >>> 3) {
|
|
462
373
|
case 1:
|
|
463
|
-
if (tag != 10) {
|
|
464
|
-
break;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
374
|
message.worldAddress = reader.string();
|
|
468
|
-
|
|
375
|
+
break;
|
|
469
376
|
case 2:
|
|
470
|
-
if (tag != 16) {
|
|
471
|
-
break;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
377
|
message.chunkPercentage = reader.uint32();
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
378
|
+
break;
|
|
379
|
+
default:
|
|
380
|
+
reader.skipType(tag & 7);
|
|
381
|
+
break;
|
|
479
382
|
}
|
|
480
|
-
reader.skipType(tag & 7);
|
|
481
383
|
}
|
|
482
384
|
return message;
|
|
483
385
|
},
|
|
484
386
|
|
|
485
|
-
create(base?: DeepPartial<ECSStateRequestLatestStream>): ECSStateRequestLatestStream {
|
|
486
|
-
return ECSStateRequestLatestStream.fromPartial(base ?? {});
|
|
487
|
-
},
|
|
488
|
-
|
|
489
387
|
fromPartial(object: DeepPartial<ECSStateRequestLatestStream>): ECSStateRequestLatestStream {
|
|
490
388
|
const message = createBaseECSStateRequestLatestStream();
|
|
491
389
|
message.worldAddress = object.worldAddress ?? "";
|
|
@@ -507,32 +405,23 @@ export const ECSStateBlockRequestLatest = {
|
|
|
507
405
|
},
|
|
508
406
|
|
|
509
407
|
decode(input: _m0.Reader | Uint8Array, length?: number): ECSStateBlockRequestLatest {
|
|
510
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader
|
|
408
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
511
409
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
512
410
|
const message = createBaseECSStateBlockRequestLatest();
|
|
513
411
|
while (reader.pos < end) {
|
|
514
412
|
const tag = reader.uint32();
|
|
515
413
|
switch (tag >>> 3) {
|
|
516
414
|
case 1:
|
|
517
|
-
if (tag != 10) {
|
|
518
|
-
break;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
415
|
message.worldAddress = reader.string();
|
|
522
|
-
|
|
416
|
+
break;
|
|
417
|
+
default:
|
|
418
|
+
reader.skipType(tag & 7);
|
|
419
|
+
break;
|
|
523
420
|
}
|
|
524
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
525
|
-
break;
|
|
526
|
-
}
|
|
527
|
-
reader.skipType(tag & 7);
|
|
528
421
|
}
|
|
529
422
|
return message;
|
|
530
423
|
},
|
|
531
424
|
|
|
532
|
-
create(base?: DeepPartial<ECSStateBlockRequestLatest>): ECSStateBlockRequestLatest {
|
|
533
|
-
return ECSStateBlockRequestLatest.fromPartial(base ?? {});
|
|
534
|
-
},
|
|
535
|
-
|
|
536
425
|
fromPartial(object: DeepPartial<ECSStateBlockRequestLatest>): ECSStateBlockRequestLatest {
|
|
537
426
|
const message = createBaseECSStateBlockRequestLatest();
|
|
538
427
|
message.worldAddress = object.worldAddress ?? "";
|
|
@@ -553,32 +442,23 @@ export const ECSStateRequestAtBlock = {
|
|
|
553
442
|
},
|
|
554
443
|
|
|
555
444
|
decode(input: _m0.Reader | Uint8Array, length?: number): ECSStateRequestAtBlock {
|
|
556
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader
|
|
445
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
557
446
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
558
447
|
const message = createBaseECSStateRequestAtBlock();
|
|
559
448
|
while (reader.pos < end) {
|
|
560
449
|
const tag = reader.uint32();
|
|
561
450
|
switch (tag >>> 3) {
|
|
562
451
|
case 1:
|
|
563
|
-
if (tag != 8) {
|
|
564
|
-
break;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
452
|
message.blockNumber = longToNumber(reader.uint64() as Long);
|
|
568
|
-
|
|
453
|
+
break;
|
|
454
|
+
default:
|
|
455
|
+
reader.skipType(tag & 7);
|
|
456
|
+
break;
|
|
569
457
|
}
|
|
570
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
571
|
-
break;
|
|
572
|
-
}
|
|
573
|
-
reader.skipType(tag & 7);
|
|
574
458
|
}
|
|
575
459
|
return message;
|
|
576
460
|
},
|
|
577
461
|
|
|
578
|
-
create(base?: DeepPartial<ECSStateRequestAtBlock>): ECSStateRequestAtBlock {
|
|
579
|
-
return ECSStateRequestAtBlock.fromPartial(base ?? {});
|
|
580
|
-
},
|
|
581
|
-
|
|
582
462
|
fromPartial(object: DeepPartial<ECSStateRequestAtBlock>): ECSStateRequestAtBlock {
|
|
583
463
|
const message = createBaseECSStateRequestAtBlock();
|
|
584
464
|
message.blockNumber = object.blockNumber ?? 0;
|
|
@@ -596,25 +476,20 @@ export const WorldsRequest = {
|
|
|
596
476
|
},
|
|
597
477
|
|
|
598
478
|
decode(input: _m0.Reader | Uint8Array, length?: number): WorldsRequest {
|
|
599
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader
|
|
479
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
600
480
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
601
481
|
const message = createBaseWorldsRequest();
|
|
602
482
|
while (reader.pos < end) {
|
|
603
483
|
const tag = reader.uint32();
|
|
604
484
|
switch (tag >>> 3) {
|
|
485
|
+
default:
|
|
486
|
+
reader.skipType(tag & 7);
|
|
487
|
+
break;
|
|
605
488
|
}
|
|
606
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
607
|
-
break;
|
|
608
|
-
}
|
|
609
|
-
reader.skipType(tag & 7);
|
|
610
489
|
}
|
|
611
490
|
return message;
|
|
612
491
|
},
|
|
613
492
|
|
|
614
|
-
create(base?: DeepPartial<WorldsRequest>): WorldsRequest {
|
|
615
|
-
return WorldsRequest.fromPartial(base ?? {});
|
|
616
|
-
},
|
|
617
|
-
|
|
618
493
|
fromPartial(_: DeepPartial<WorldsRequest>): WorldsRequest {
|
|
619
494
|
const message = createBaseWorldsRequest();
|
|
620
495
|
return message;
|
|
@@ -646,60 +521,35 @@ export const ECSStateReply = {
|
|
|
646
521
|
},
|
|
647
522
|
|
|
648
523
|
decode(input: _m0.Reader | Uint8Array, length?: number): ECSStateReply {
|
|
649
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader
|
|
524
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
650
525
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
651
526
|
const message = createBaseECSStateReply();
|
|
652
527
|
while (reader.pos < end) {
|
|
653
528
|
const tag = reader.uint32();
|
|
654
529
|
switch (tag >>> 3) {
|
|
655
530
|
case 1:
|
|
656
|
-
if (tag != 10) {
|
|
657
|
-
break;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
531
|
message.state.push(ECSState.decode(reader, reader.uint32()));
|
|
661
|
-
|
|
532
|
+
break;
|
|
662
533
|
case 2:
|
|
663
|
-
if (tag != 18) {
|
|
664
|
-
break;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
534
|
message.stateComponents.push(reader.string());
|
|
668
|
-
|
|
535
|
+
break;
|
|
669
536
|
case 3:
|
|
670
|
-
if (tag != 26) {
|
|
671
|
-
break;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
537
|
message.stateEntities.push(reader.string());
|
|
675
|
-
|
|
538
|
+
break;
|
|
676
539
|
case 4:
|
|
677
|
-
if (tag != 34) {
|
|
678
|
-
break;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
540
|
message.stateHash = reader.string();
|
|
682
|
-
|
|
541
|
+
break;
|
|
683
542
|
case 5:
|
|
684
|
-
if (tag != 40) {
|
|
685
|
-
break;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
543
|
message.blockNumber = reader.uint32();
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
544
|
+
break;
|
|
545
|
+
default:
|
|
546
|
+
reader.skipType(tag & 7);
|
|
547
|
+
break;
|
|
693
548
|
}
|
|
694
|
-
reader.skipType(tag & 7);
|
|
695
549
|
}
|
|
696
550
|
return message;
|
|
697
551
|
},
|
|
698
552
|
|
|
699
|
-
create(base?: DeepPartial<ECSStateReply>): ECSStateReply {
|
|
700
|
-
return ECSStateReply.fromPartial(base ?? {});
|
|
701
|
-
},
|
|
702
|
-
|
|
703
553
|
fromPartial(object: DeepPartial<ECSStateReply>): ECSStateReply {
|
|
704
554
|
const message = createBaseECSStateReply();
|
|
705
555
|
message.state = object.state?.map((e) => ECSState.fromPartial(e)) || [];
|
|
@@ -736,60 +586,35 @@ export const ECSStateReplyV2 = {
|
|
|
736
586
|
},
|
|
737
587
|
|
|
738
588
|
decode(input: _m0.Reader | Uint8Array, length?: number): ECSStateReplyV2 {
|
|
739
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader
|
|
589
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
740
590
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
741
591
|
const message = createBaseECSStateReplyV2();
|
|
742
592
|
while (reader.pos < end) {
|
|
743
593
|
const tag = reader.uint32();
|
|
744
594
|
switch (tag >>> 3) {
|
|
745
595
|
case 1:
|
|
746
|
-
if (tag != 10) {
|
|
747
|
-
break;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
596
|
message.state.push(ECSState.decode(reader, reader.uint32()));
|
|
751
|
-
|
|
597
|
+
break;
|
|
752
598
|
case 2:
|
|
753
|
-
if (tag != 18) {
|
|
754
|
-
break;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
599
|
message.stateComponents.push(reader.string());
|
|
758
|
-
|
|
600
|
+
break;
|
|
759
601
|
case 3:
|
|
760
|
-
if (tag != 26) {
|
|
761
|
-
break;
|
|
762
|
-
}
|
|
763
|
-
|
|
764
602
|
message.stateEntities.push(reader.bytes());
|
|
765
|
-
|
|
603
|
+
break;
|
|
766
604
|
case 4:
|
|
767
|
-
if (tag != 34) {
|
|
768
|
-
break;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
605
|
message.stateHash = reader.string();
|
|
772
|
-
|
|
606
|
+
break;
|
|
773
607
|
case 5:
|
|
774
|
-
if (tag != 40) {
|
|
775
|
-
break;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
608
|
message.blockNumber = reader.uint32();
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
609
|
+
break;
|
|
610
|
+
default:
|
|
611
|
+
reader.skipType(tag & 7);
|
|
612
|
+
break;
|
|
783
613
|
}
|
|
784
|
-
reader.skipType(tag & 7);
|
|
785
614
|
}
|
|
786
615
|
return message;
|
|
787
616
|
},
|
|
788
617
|
|
|
789
|
-
create(base?: DeepPartial<ECSStateReplyV2>): ECSStateReplyV2 {
|
|
790
|
-
return ECSStateReplyV2.fromPartial(base ?? {});
|
|
791
|
-
},
|
|
792
|
-
|
|
793
618
|
fromPartial(object: DeepPartial<ECSStateReplyV2>): ECSStateReplyV2 {
|
|
794
619
|
const message = createBaseECSStateReplyV2();
|
|
795
620
|
message.state = object.state?.map((e) => ECSState.fromPartial(e)) || [];
|
|
@@ -814,32 +639,23 @@ export const ECSStateBlockReply = {
|
|
|
814
639
|
},
|
|
815
640
|
|
|
816
641
|
decode(input: _m0.Reader | Uint8Array, length?: number): ECSStateBlockReply {
|
|
817
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader
|
|
642
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
818
643
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
819
644
|
const message = createBaseECSStateBlockReply();
|
|
820
645
|
while (reader.pos < end) {
|
|
821
646
|
const tag = reader.uint32();
|
|
822
647
|
switch (tag >>> 3) {
|
|
823
648
|
case 1:
|
|
824
|
-
if (tag != 8) {
|
|
825
|
-
break;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
649
|
message.blockNumber = reader.uint32();
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
650
|
+
break;
|
|
651
|
+
default:
|
|
652
|
+
reader.skipType(tag & 7);
|
|
653
|
+
break;
|
|
833
654
|
}
|
|
834
|
-
reader.skipType(tag & 7);
|
|
835
655
|
}
|
|
836
656
|
return message;
|
|
837
657
|
},
|
|
838
658
|
|
|
839
|
-
create(base?: DeepPartial<ECSStateBlockReply>): ECSStateBlockReply {
|
|
840
|
-
return ECSStateBlockReply.fromPartial(base ?? {});
|
|
841
|
-
},
|
|
842
|
-
|
|
843
659
|
fromPartial(object: DeepPartial<ECSStateBlockReply>): ECSStateBlockReply {
|
|
844
660
|
const message = createBaseECSStateBlockReply();
|
|
845
661
|
message.blockNumber = object.blockNumber ?? 0;
|
|
@@ -936,7 +752,7 @@ export const ECSStateSnapshotServiceDefinition = {
|
|
|
936
752
|
},
|
|
937
753
|
} as const;
|
|
938
754
|
|
|
939
|
-
export interface
|
|
755
|
+
export interface ECSStateSnapshotServiceServiceImplementation<CallContextExt = {}> {
|
|
940
756
|
/** Requests the latest ECS state. */
|
|
941
757
|
getStateLatest(
|
|
942
758
|
request: ECSStateRequestLatest,
|
|
@@ -1035,7 +851,7 @@ export interface ECSStateSnapshotServiceClient<CallOptionsExt = {}> {
|
|
|
1035
851
|
declare var self: any | undefined;
|
|
1036
852
|
declare var window: any | undefined;
|
|
1037
853
|
declare var global: any | undefined;
|
|
1038
|
-
var
|
|
854
|
+
var globalThis: any = (() => {
|
|
1039
855
|
if (typeof globalThis !== "undefined") {
|
|
1040
856
|
return globalThis;
|
|
1041
857
|
}
|
|
@@ -1065,7 +881,7 @@ export type DeepPartial<T> = T extends Builtin
|
|
|
1065
881
|
|
|
1066
882
|
function longToNumber(long: Long): number {
|
|
1067
883
|
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
1068
|
-
throw new
|
|
884
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1069
885
|
}
|
|
1070
886
|
return long.toNumber();
|
|
1071
887
|
}
|