@shipload/sdk 1.0.0-next.1 → 1.0.0-next.10

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.
Files changed (51) hide show
  1. package/lib/shipload.d.ts +512 -320
  2. package/lib/shipload.js +1960 -1060
  3. package/lib/shipload.js.map +1 -1
  4. package/lib/shipload.m.js +1920 -1056
  5. package/lib/shipload.m.js.map +1 -1
  6. package/package.json +2 -2
  7. package/src/capabilities/modules.ts +3 -0
  8. package/src/capabilities/storage.ts +1 -1
  9. package/src/contracts/platform.ts +13 -1
  10. package/src/contracts/server.ts +227 -282
  11. package/src/data/capabilities.ts +5 -330
  12. package/src/data/capability-formulas.ts +70 -0
  13. package/src/data/catalog.ts +0 -5
  14. package/src/data/colors.ts +2 -16
  15. package/src/data/entities.json +33 -10
  16. package/src/data/item-ids.ts +3 -1
  17. package/src/data/items.json +258 -0
  18. package/src/data/metadata.ts +57 -1
  19. package/src/data/recipes-runtime.ts +1 -0
  20. package/src/data/recipes.json +82 -11
  21. package/src/derivation/capability-mappings.ts +122 -0
  22. package/src/derivation/index.ts +1 -0
  23. package/src/derivation/resources.ts +116 -37
  24. package/src/derivation/stats.ts +1 -2
  25. package/src/entities/container.ts +25 -10
  26. package/src/entities/extractor.ts +144 -0
  27. package/src/entities/gamestate.ts +0 -9
  28. package/src/entities/makers.ts +71 -20
  29. package/src/entities/ship-deploy.ts +114 -56
  30. package/src/entities/ship.ts +17 -0
  31. package/src/entities/slot-multiplier.ts +21 -0
  32. package/src/entities/warehouse.ts +20 -3
  33. package/src/index-module.ts +67 -26
  34. package/src/managers/actions.ts +53 -80
  35. package/src/managers/entities.ts +31 -17
  36. package/src/managers/locations.ts +2 -20
  37. package/src/nft/atomicdata.ts +125 -0
  38. package/src/nft/description.ts +41 -7
  39. package/src/nft/index.ts +1 -0
  40. package/src/resolution/resolve-item.ts +17 -9
  41. package/src/scheduling/accessor.ts +4 -0
  42. package/src/scheduling/projection.ts +8 -0
  43. package/src/scheduling/schedule.ts +15 -1
  44. package/src/scheduling/task-cargo.ts +47 -0
  45. package/src/subscriptions/connection.ts +50 -2
  46. package/src/subscriptions/manager.ts +81 -2
  47. package/src/travel/travel.ts +61 -2
  48. package/src/types/entity-traits.ts +64 -1
  49. package/src/types.ts +11 -1
  50. package/src/utils/cargo.ts +27 -0
  51. package/src/utils/system.ts +25 -24
package/lib/shipload.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _wharfkit_antelope from '@wharfkit/antelope';
2
- import { Blob, ABI, Struct, Name, UInt64, Checksum256, UInt32, TimePointSec, Checksum256Type, UInt32Type, NameType, UInt64Type, Action, UInt8, Int64, UInt16, TimePoint, Bytes, Int32, UInt16Type, UInt8Type, TimePointType, Int64Type, Int32Type, Checksum512, APIClient } from '@wharfkit/antelope';
2
+ import { Blob, ABI, Struct, Name, UInt64, Checksum256, UInt32, TimePointSec, Checksum256Type, UInt32Type, NameType, UInt64Type, Action, UInt16, UInt8, Int64, TimePoint, Bytes, Int32, UInt16Type, UInt8Type, Int64Type, TimePointType, Int32Type, Checksum512, APIClient } from '@wharfkit/antelope';
3
3
  import * as _wharfkit_contract from '@wharfkit/contract';
4
4
  import { Contract as Contract$2, PartialBy, ContractArgs, ActionOptions, Table } from '@wharfkit/contract';
5
5
  import { ChainDefinition } from '@wharfkit/common';
@@ -48,6 +48,10 @@ declare namespace Types$1 {
48
48
  meta: game_meta;
49
49
  state: game_state;
50
50
  }
51
+ class setepochtime extends Struct {
52
+ contract: Name;
53
+ epochtime: UInt32;
54
+ }
51
55
  class startgame extends Struct {
52
56
  contract: Name;
53
57
  config: game_config;
@@ -110,6 +114,10 @@ declare namespace ActionParams$1 {
110
114
  account: NameType;
111
115
  name: string;
112
116
  }
117
+ interface setepochtime {
118
+ contract: NameType;
119
+ epochtime: UInt32Type;
120
+ }
113
121
  interface startgame {
114
122
  contract: NameType;
115
123
  config: Type.game_config;
@@ -128,6 +136,7 @@ interface ActionNameParams$1 {
128
136
  enable: ActionParams$1.enable;
129
137
  enablegame: ActionParams$1.enablegame;
130
138
  foundcompany: ActionParams$1.foundcompany;
139
+ setepochtime: ActionParams$1.setepochtime;
131
140
  startgame: ActionParams$1.startgame;
132
141
  updategame: ActionParams$1.updategame;
133
142
  wipe: ActionParams$1.wipe;
@@ -158,12 +167,24 @@ declare namespace platform {
158
167
  declare const abiBlob: Blob;
159
168
  declare const abi: ABI;
160
169
  declare namespace Types {
170
+ class packed_module extends Struct {
171
+ item_id: UInt16;
172
+ stats: UInt64;
173
+ }
174
+ class module_entry extends Struct {
175
+ type: UInt8;
176
+ installed?: packed_module;
177
+ }
178
+ class cargo_ref extends Struct {
179
+ item_id: UInt16;
180
+ stats: UInt64;
181
+ modules: module_entry[];
182
+ }
161
183
  class addmodule extends Struct {
162
- entity_type: Name;
163
184
  entity_id: UInt64;
164
185
  module_index: UInt8;
165
- module_cargo_id: UInt64;
166
- target_cargo_id: UInt64;
186
+ module_ref: cargo_ref;
187
+ target_ref?: cargo_ref;
167
188
  }
168
189
  class addnexus extends Struct {
169
190
  nexus_name: string;
@@ -174,27 +195,17 @@ declare namespace Types {
174
195
  reveal: string;
175
196
  commit: Checksum256;
176
197
  }
177
- class packed_module extends Struct {
178
- item_id: UInt16;
179
- stats: UInt64;
180
- }
181
- class module_entry extends Struct {
182
- type: UInt8;
183
- installed?: packed_module;
184
- }
185
198
  class cargo_item extends Struct {
186
199
  item_id: UInt16;
187
- quantity: UInt32;
188
200
  stats: UInt64;
189
201
  modules: module_entry[];
202
+ quantity: UInt32;
190
203
  }
191
204
  class blend extends Struct {
192
- entity_type: Name;
193
205
  id: UInt64;
194
206
  inputs: cargo_item[];
195
207
  }
196
208
  class cancel extends Struct {
197
- entity_type: Name;
198
209
  id: UInt64;
199
210
  count: UInt64;
200
211
  }
@@ -218,6 +229,13 @@ declare namespace Types {
218
229
  stats: UInt64;
219
230
  modules: module_entry[];
220
231
  }
232
+ class cargo_view extends Struct {
233
+ item_id: UInt16;
234
+ stats: UInt64;
235
+ modules: module_entry[];
236
+ quantity: UInt32;
237
+ id: UInt64;
238
+ }
221
239
  class claimstarter extends Struct {
222
240
  account: Name;
223
241
  x: Int64;
@@ -259,32 +277,7 @@ declare namespace Types {
259
277
  y: Int64;
260
278
  z?: UInt16;
261
279
  }
262
- class task extends Struct {
263
- type: UInt8;
264
- duration: UInt32;
265
- cancelable: UInt8;
266
- coordinates?: coordinates;
267
- cargo: cargo_item[];
268
- entitytarget?: entity_ref;
269
- entitygroup?: UInt64;
270
- energy_cost?: UInt16;
271
- }
272
- class schedule extends Struct {
273
- started: TimePoint;
274
- tasks: task[];
275
- }
276
- class container_row extends Struct {
277
- id: UInt64;
278
- owner: Name;
279
- name: string;
280
- coordinates: coordinates;
281
- hullmass: UInt32;
282
- capacity: UInt32;
283
- cargomass: UInt32;
284
- schedule?: schedule;
285
- }
286
280
  class craft extends Struct {
287
- entity_type: Name;
288
281
  id: UInt64;
289
282
  recipe_id: UInt16;
290
283
  quantity: UInt32;
@@ -301,11 +294,12 @@ declare namespace Types {
301
294
  x: Int64;
302
295
  y: Int64;
303
296
  }
297
+ class demolish extends Struct {
298
+ entity_id: UInt64;
299
+ }
304
300
  class deploy extends Struct {
305
- entity_type: Name;
306
301
  id: UInt64;
307
- packed_item_id: UInt16;
308
- stats: UInt64;
302
+ ref: cargo_ref;
309
303
  }
310
304
  class descentity extends Struct {
311
305
  item_id: UInt16;
@@ -347,6 +341,20 @@ declare namespace Types {
347
341
  class warp_stats extends Struct {
348
342
  range: UInt32;
349
343
  }
344
+ class task extends Struct {
345
+ type: UInt8;
346
+ duration: UInt32;
347
+ cancelable: UInt8;
348
+ coordinates?: coordinates;
349
+ cargo: cargo_item[];
350
+ entitytarget?: entity_ref;
351
+ entitygroup?: UInt64;
352
+ energy_cost?: UInt16;
353
+ }
354
+ class schedule extends Struct {
355
+ started: TimePoint;
356
+ tasks: task[];
357
+ }
350
358
  class entity_info extends Struct {
351
359
  type: Name;
352
360
  id: UInt64;
@@ -354,7 +362,7 @@ declare namespace Types {
354
362
  entity_name: string;
355
363
  coordinates: coordinates;
356
364
  cargomass: UInt32;
357
- cargo: cargo_item[];
365
+ cargo: cargo_view[];
358
366
  loaders?: loader_stats;
359
367
  modules: module_entry[];
360
368
  energy?: UInt16;
@@ -376,6 +384,7 @@ declare namespace Types {
376
384
  }
377
385
  class slot_def extends Struct {
378
386
  type: UInt8;
387
+ output_pct: UInt16;
379
388
  }
380
389
  class entity_layout extends Struct {
381
390
  entity_item_id: UInt16;
@@ -384,6 +393,28 @@ declare namespace Types {
384
393
  class entity_layouts_result extends Struct {
385
394
  entities: entity_layout[];
386
395
  }
396
+ class entity_row extends Struct {
397
+ id: UInt64;
398
+ owner: Name;
399
+ kind: Name;
400
+ name: string;
401
+ stats: UInt64;
402
+ coordinates: coordinates;
403
+ hullmass?: UInt32;
404
+ capacity?: UInt32;
405
+ energy?: UInt16;
406
+ cargomass: UInt32;
407
+ engines?: movement_stats;
408
+ generator?: energy_stats;
409
+ loaders?: loader_stats;
410
+ gatherer?: gatherer_stats;
411
+ warp?: warp_stats;
412
+ crafter?: crafter_stats;
413
+ hauler?: hauler_stats;
414
+ modules: module_entry[];
415
+ schedule?: schedule;
416
+ item_id: UInt16;
417
+ }
387
418
  class entity_summary extends Struct {
388
419
  type: Name;
389
420
  id: UInt64;
@@ -411,20 +442,26 @@ declare namespace Types {
411
442
  class enum_result extends Struct {
412
443
  members: enum_member[];
413
444
  }
445
+ class fixcargomass extends Struct {
446
+ entity_id: UInt64;
447
+ }
414
448
  class gather extends Struct {
415
- source: entity_ref;
416
- destination: entity_ref;
449
+ source_id: UInt64;
450
+ destination_id: UInt64;
417
451
  stratum: UInt16;
418
452
  quantity: UInt32;
419
453
  }
420
454
  class getconfig extends Struct {
421
455
  }
456
+ class geteligible extends Struct {
457
+ coords: coordinates;
458
+ stratum: UInt16;
459
+ }
422
460
  class getentities extends Struct {
423
461
  owner: Name;
424
462
  entity_type?: Name;
425
463
  }
426
464
  class getentity extends Struct {
427
- entity_type: Name;
428
465
  entity_id: UInt64;
429
466
  }
430
467
  class getitemdata extends Struct {
@@ -448,7 +485,6 @@ declare namespace Types {
448
485
  class getmodules extends Struct {
449
486
  }
450
487
  class getnearby extends Struct {
451
- entity_type: Name;
452
488
  entity_id: UInt64;
453
489
  recharge: boolean;
454
490
  }
@@ -495,7 +531,7 @@ declare namespace Types {
495
531
  class hash512 extends Struct {
496
532
  value: string;
497
533
  }
498
- class init extends Struct {
534
+ class initialize extends Struct {
499
535
  seed: Checksum256;
500
536
  }
501
537
  class item_id_pair extends Struct {
@@ -551,28 +587,14 @@ declare namespace Types {
551
587
  seed0: UInt8;
552
588
  seed1: UInt8;
553
589
  }
554
- class location_epoch extends Struct {
555
- active: boolean;
556
- seed0: UInt8;
557
- seed1: UInt8;
558
- }
559
590
  class location_derived extends Struct {
560
591
  static_props: location_static;
561
- epoch_props: location_epoch;
562
592
  size: UInt16;
563
593
  }
564
594
  class location_info extends Struct {
565
595
  coords: coordinates;
566
596
  is_system: boolean;
567
597
  }
568
- class location_row extends Struct {
569
- id: UInt64;
570
- owner: Name;
571
- coordinates: coordinates;
572
- cargomass: UInt32;
573
- cargo: cargo_item[];
574
- schedule?: schedule;
575
- }
576
598
  class module_info extends Struct {
577
599
  id: UInt16;
578
600
  mass: UInt32;
@@ -595,12 +617,6 @@ declare namespace Types {
595
617
  max_energy: UInt16;
596
618
  systems: nearby_system[];
597
619
  }
598
- class nexus_row extends Struct {
599
- id: UInt64;
600
- owner: Name;
601
- name: string;
602
- coordinates: coordinates;
603
- }
604
620
  class schema_field extends Struct {
605
621
  name: string;
606
622
  field_type: string;
@@ -640,17 +656,16 @@ declare namespace Types {
640
656
  owner: Name;
641
657
  is_player: boolean;
642
658
  company_name: string;
643
- ship_count: UInt64;
644
- warehouse_count: UInt64;
645
- container_count: UInt64;
646
659
  }
647
660
  class player_row extends Struct {
648
661
  owner: Name;
649
662
  }
650
663
  class recharge extends Struct {
651
- entity_type: Name;
652
664
  id: UInt64;
653
665
  }
666
+ class refrshentity extends Struct {
667
+ entity_id: UInt64;
668
+ }
654
669
  class reserve_row extends Struct {
655
670
  id: UInt64;
656
671
  coord_id: UInt64;
@@ -658,7 +673,6 @@ declare namespace Types {
658
673
  remaining: UInt32;
659
674
  }
660
675
  class resolve extends Struct {
661
- entity_type: Name;
662
676
  id: UInt64;
663
677
  count?: UInt64;
664
678
  }
@@ -685,10 +699,9 @@ declare namespace Types {
685
699
  resources: resource_info[];
686
700
  }
687
701
  class rmmodule extends Struct {
688
- entity_type: Name;
689
702
  entity_id: UInt64;
690
703
  module_index: UInt8;
691
- target_cargo_id: UInt64;
704
+ target_ref?: cargo_ref;
692
705
  }
693
706
  class rmnftcfg extends Struct {
694
707
  item_id: UInt16;
@@ -696,34 +709,13 @@ declare namespace Types {
696
709
  class salt extends Struct {
697
710
  salt: UInt64;
698
711
  }
699
- class sequence_row extends Struct {
700
- key: Name;
701
- value: UInt64;
702
- }
703
712
  class setnftcfg extends Struct {
704
713
  item_id: UInt16;
705
714
  template_id: Int32;
706
715
  schema_name: Name;
707
716
  }
708
- class ship_row extends Struct {
709
- id: UInt64;
710
- owner: Name;
711
- name: string;
712
- stats: UInt64;
713
- coordinates: coordinates;
714
- hullmass?: UInt32;
715
- capacity?: UInt32;
716
- energy?: UInt16;
717
- cargomass: UInt32;
718
- engines?: movement_stats;
719
- generator?: energy_stats;
720
- loaders?: loader_stats;
721
- gatherer?: gatherer_stats;
722
- warp?: warp_stats;
723
- crafter?: crafter_stats;
724
- hauler?: hauler_stats;
725
- modules: module_entry[];
726
- schedule?: schedule;
717
+ class skipreveal extends Struct {
718
+ commit: Checksum256;
727
719
  }
728
720
  class spawncargo extends Struct {
729
721
  entity_id: UInt64;
@@ -746,7 +738,6 @@ declare namespace Types {
746
738
  enabled: boolean;
747
739
  epoch: UInt32;
748
740
  salt: UInt64;
749
- ships: UInt32;
750
741
  seed: Checksum256;
751
742
  commit: Checksum256;
752
743
  }
@@ -769,16 +760,11 @@ declare namespace Types {
769
760
  entities: entity_task_info[];
770
761
  }
771
762
  class transfer extends Struct {
772
- source_type: Name;
773
763
  source_id: UInt64;
774
- dest_type: Name;
775
764
  dest_id: UInt64;
776
- item_id: UInt16;
777
- stats: UInt64;
778
- quantity: UInt32;
765
+ items: cargo_item[];
779
766
  }
780
767
  class travel extends Struct {
781
- entity_type: Name;
782
768
  id: UInt64;
783
769
  x: Int64;
784
770
  y: Int64;
@@ -790,74 +776,54 @@ declare namespace Types {
790
776
  game_config_type: game_config;
791
777
  stratum_remaining_type: stratum_remaining;
792
778
  }
793
- class warehouse_row extends Struct {
794
- id: UInt64;
795
- owner: Name;
796
- name: string;
797
- stats: UInt64;
798
- coordinates: coordinates;
799
- hullmass?: UInt32;
800
- capacity?: UInt32;
801
- cargomass: UInt32;
802
- loaders?: loader_stats;
803
- modules: module_entry[];
804
- schedule?: schedule;
779
+ class undeploy extends Struct {
780
+ host_id: UInt64;
781
+ target_id: UInt64;
805
782
  }
806
783
  class warp extends Struct {
807
- entity_type: Name;
808
784
  id: UInt64;
809
785
  x: Int64;
810
786
  y: Int64;
811
787
  }
812
788
  class wipe extends Struct {
813
789
  }
814
- class wipesequence extends Struct {
815
- }
816
790
  class wrap extends Struct {
817
791
  owner: Name;
818
- entity_type: Name;
819
792
  entity_id: UInt64;
820
- cargo_id: UInt64;
821
- quantity: UInt64;
793
+ nexus_id: UInt64;
794
+ items: cargo_item[];
795
+ }
796
+ class wrapentity extends Struct {
797
+ entity_id: UInt64;
798
+ nexus_id: UInt64;
822
799
  }
823
800
  }
824
801
  declare const TableMap: {
825
802
  cargo: typeof Types.cargo_row;
826
- container: typeof Types.container_row;
803
+ entity: typeof Types.entity_row;
827
804
  entitygroup: typeof Types.entitygroup_row;
828
- location: typeof Types.location_row;
829
- nexus: typeof Types.nexus_row;
830
805
  nftconfig: typeof Types.nftconfig_row;
831
806
  player: typeof Types.player_row;
832
807
  reserve: typeof Types.reserve_row;
833
- sequence: typeof Types.sequence_row;
834
- ship: typeof Types.ship_row;
835
808
  state: typeof Types.state_row;
836
809
  types: typeof Types.types_row;
837
- warehouse: typeof Types.warehouse_row;
838
810
  };
839
811
  interface TableTypes {
840
812
  cargo: Types.cargo_row;
841
- container: Types.container_row;
813
+ entity: Types.entity_row;
842
814
  entitygroup: Types.entitygroup_row;
843
- location: Types.location_row;
844
- nexus: Types.nexus_row;
845
815
  nftconfig: Types.nftconfig_row;
846
816
  player: Types.player_row;
847
817
  reserve: Types.reserve_row;
848
- sequence: Types.sequence_row;
849
- ship: Types.ship_row;
850
818
  state: Types.state_row;
851
819
  types: Types.types_row;
852
- warehouse: Types.warehouse_row;
853
820
  }
854
821
  type RowType<T> = T extends keyof TableTypes ? TableTypes[T] : any;
855
822
  type TableNames = keyof TableTypes;
856
823
  declare namespace ActionParams {
857
824
  namespace Type {
858
- interface cargo_item {
825
+ interface cargo_ref {
859
826
  item_id: UInt16Type;
860
- quantity: UInt32Type;
861
827
  stats: UInt64Type;
862
828
  modules: Type.module_entry[];
863
829
  }
@@ -869,6 +835,12 @@ declare namespace ActionParams {
869
835
  item_id: UInt16Type;
870
836
  stats: UInt64Type;
871
837
  }
838
+ interface cargo_item {
839
+ item_id: UInt16Type;
840
+ stats: UInt64Type;
841
+ modules: Type.module_entry[];
842
+ quantity: UInt32Type;
843
+ }
872
844
  interface game_config {
873
845
  version: UInt32Type;
874
846
  defaults: Type.entity_defaults;
@@ -885,6 +857,11 @@ declare namespace ActionParams {
885
857
  subtype: UInt8Type;
886
858
  tier: UInt8Type;
887
859
  }
860
+ interface coordinates {
861
+ x: Int64Type;
862
+ y: Int64Type;
863
+ z?: UInt16Type;
864
+ }
888
865
  interface entity_ref {
889
866
  entity_type: NameType;
890
867
  entity_id: UInt64Type;
@@ -910,18 +887,12 @@ declare namespace ActionParams {
910
887
  entitygroup?: UInt64Type;
911
888
  energy_cost?: UInt16Type;
912
889
  }
913
- interface coordinates {
914
- x: Int64Type;
915
- y: Int64Type;
916
- z?: UInt16Type;
917
- }
918
890
  }
919
891
  interface addmodule {
920
- entity_type: NameType;
921
892
  entity_id: UInt64Type;
922
893
  module_index: UInt8Type;
923
- module_cargo_id: UInt64Type;
924
- target_cargo_id: UInt64Type;
894
+ module_ref: Type.cargo_ref;
895
+ target_ref?: Type.cargo_ref;
925
896
  }
926
897
  interface addnexus {
927
898
  nexus_name: string;
@@ -933,12 +904,10 @@ declare namespace ActionParams {
933
904
  commit: Checksum256Type;
934
905
  }
935
906
  interface blend {
936
- entity_type: NameType;
937
907
  id: UInt64Type;
938
908
  inputs: Type.cargo_item[];
939
909
  }
940
910
  interface cancel {
941
- entity_type: NameType;
942
911
  id: UInt64Type;
943
912
  count: UInt64Type;
944
913
  }
@@ -963,7 +932,6 @@ declare namespace ActionParams {
963
932
  config: Type.game_config;
964
933
  }
965
934
  interface craft {
966
- entity_type: NameType;
967
935
  id: UInt64Type;
968
936
  recipe_id: UInt16Type;
969
937
  quantity: UInt32Type;
@@ -976,11 +944,12 @@ declare namespace ActionParams {
976
944
  x: Int64Type;
977
945
  y: Int64Type;
978
946
  }
947
+ interface demolish {
948
+ entity_id: UInt64Type;
949
+ }
979
950
  interface deploy {
980
- entity_type: NameType;
981
951
  id: UInt64Type;
982
- packed_item_id: UInt16Type;
983
- stats: UInt64Type;
952
+ ref: Type.cargo_ref;
984
953
  }
985
954
  interface descentity {
986
955
  item_id: UInt16Type;
@@ -991,20 +960,26 @@ declare namespace ActionParams {
991
960
  interface enable {
992
961
  enabled: boolean;
993
962
  }
963
+ interface fixcargomass {
964
+ entity_id: UInt64Type;
965
+ }
994
966
  interface gather {
995
- source: Type.entity_ref;
996
- destination: Type.entity_ref;
967
+ source_id: UInt64Type;
968
+ destination_id: UInt64Type;
997
969
  stratum: UInt16Type;
998
970
  quantity: UInt32Type;
999
971
  }
1000
972
  interface getconfig {
1001
973
  }
974
+ interface geteligible {
975
+ coords: Type.coordinates;
976
+ stratum: UInt16Type;
977
+ }
1002
978
  interface getentities {
1003
979
  owner: NameType;
1004
980
  entity_type?: NameType;
1005
981
  }
1006
982
  interface getentity {
1007
- entity_type: NameType;
1008
983
  entity_id: UInt64Type;
1009
984
  }
1010
985
  interface getitemdata {
@@ -1028,7 +1003,6 @@ declare namespace ActionParams {
1028
1003
  interface getmodules {
1029
1004
  }
1030
1005
  interface getnearby {
1031
- entity_type: NameType;
1032
1006
  entity_id: UInt64Type;
1033
1007
  recharge: boolean;
1034
1008
  }
@@ -1075,7 +1049,7 @@ declare namespace ActionParams {
1075
1049
  interface hash512 {
1076
1050
  value: string;
1077
1051
  }
1078
- interface init {
1052
+ interface initialize {
1079
1053
  seed: Checksum256Type;
1080
1054
  }
1081
1055
  interface join {
@@ -1085,19 +1059,19 @@ declare namespace ActionParams {
1085
1059
  event: Type.task_event;
1086
1060
  }
1087
1061
  interface recharge {
1088
- entity_type: NameType;
1089
1062
  id: UInt64Type;
1090
1063
  }
1064
+ interface refrshentity {
1065
+ entity_id: UInt64Type;
1066
+ }
1091
1067
  interface resolve {
1092
- entity_type: NameType;
1093
1068
  id: UInt64Type;
1094
1069
  count?: UInt64Type;
1095
1070
  }
1096
1071
  interface rmmodule {
1097
- entity_type: NameType;
1098
1072
  entity_id: UInt64Type;
1099
1073
  module_index: UInt8Type;
1100
- target_cargo_id: UInt64Type;
1074
+ target_ref?: Type.cargo_ref;
1101
1075
  }
1102
1076
  interface rmnftcfg {
1103
1077
  item_id: UInt16Type;
@@ -1110,6 +1084,9 @@ declare namespace ActionParams {
1110
1084
  template_id: Int32Type;
1111
1085
  schema_name: NameType;
1112
1086
  }
1087
+ interface skipreveal {
1088
+ commit: Checksum256Type;
1089
+ }
1113
1090
  interface spawncargo {
1114
1091
  entity_id: UInt64Type;
1115
1092
  item_id: UInt64Type;
@@ -1128,37 +1105,36 @@ declare namespace ActionParams {
1128
1105
  stats: UInt64Type;
1129
1106
  }
1130
1107
  interface transfer {
1131
- source_type: NameType;
1132
1108
  source_id: UInt64Type;
1133
- dest_type: NameType;
1134
1109
  dest_id: UInt64Type;
1135
- item_id: UInt16Type;
1136
- stats: UInt64Type;
1137
- quantity: UInt32Type;
1110
+ items: Type.cargo_item[];
1138
1111
  }
1139
1112
  interface travel {
1140
- entity_type: NameType;
1141
1113
  id: UInt64Type;
1142
1114
  x: Int64Type;
1143
1115
  y: Int64Type;
1144
1116
  recharge: boolean;
1145
1117
  }
1118
+ interface undeploy {
1119
+ host_id: UInt64Type;
1120
+ target_id: UInt64Type;
1121
+ }
1146
1122
  interface warp {
1147
- entity_type: NameType;
1148
1123
  id: UInt64Type;
1149
1124
  x: Int64Type;
1150
1125
  y: Int64Type;
1151
1126
  }
1152
1127
  interface wipe {
1153
1128
  }
1154
- interface wipesequence {
1155
- }
1156
1129
  interface wrap {
1157
1130
  owner: NameType;
1158
- entity_type: NameType;
1159
1131
  entity_id: UInt64Type;
1160
- cargo_id: UInt64Type;
1161
- quantity: UInt64Type;
1132
+ nexus_id: UInt64Type;
1133
+ items: Type.cargo_item[];
1134
+ }
1135
+ interface wrapentity {
1136
+ entity_id: UInt64Type;
1137
+ nexus_id: UInt64Type;
1162
1138
  }
1163
1139
  }
1164
1140
  interface ActionNameParams {
@@ -1174,11 +1150,14 @@ interface ActionNameParams {
1174
1150
  configlog: ActionParams.configlog;
1175
1151
  craft: ActionParams.craft;
1176
1152
  createentity: ActionParams.createentity;
1153
+ demolish: ActionParams.demolish;
1177
1154
  deploy: ActionParams.deploy;
1178
1155
  descentity: ActionParams.descentity;
1179
1156
  enable: ActionParams.enable;
1157
+ fixcargomass: ActionParams.fixcargomass;
1180
1158
  gather: ActionParams.gather;
1181
1159
  getconfig: ActionParams.getconfig;
1160
+ geteligible: ActionParams.geteligible;
1182
1161
  getentities: ActionParams.getentities;
1183
1162
  getentity: ActionParams.getentity;
1184
1163
  getitemdata: ActionParams.getitemdata;
@@ -1203,33 +1182,38 @@ interface ActionNameParams {
1203
1182
  grouptravel: ActionParams.grouptravel;
1204
1183
  hash: ActionParams.hash;
1205
1184
  hash512: ActionParams.hash512;
1206
- init: ActionParams.init;
1185
+ initialize: ActionParams.initialize;
1207
1186
  join: ActionParams.join;
1208
1187
  notify: ActionParams.notify;
1209
1188
  recharge: ActionParams.recharge;
1189
+ refrshentity: ActionParams.refrshentity;
1210
1190
  resolve: ActionParams.resolve;
1211
1191
  rmmodule: ActionParams.rmmodule;
1212
1192
  rmnftcfg: ActionParams.rmnftcfg;
1213
1193
  salt: ActionParams.salt;
1214
1194
  setnftcfg: ActionParams.setnftcfg;
1195
+ skipreveal: ActionParams.skipreveal;
1215
1196
  spawncargo: ActionParams.spawncargo;
1216
1197
  spawnpacked: ActionParams.spawnpacked;
1217
1198
  spawnseeded: ActionParams.spawnseeded;
1218
1199
  transfer: ActionParams.transfer;
1219
1200
  travel: ActionParams.travel;
1201
+ undeploy: ActionParams.undeploy;
1220
1202
  warp: ActionParams.warp;
1221
1203
  wipe: ActionParams.wipe;
1222
- wipesequence: ActionParams.wipesequence;
1223
1204
  wrap: ActionParams.wrap;
1205
+ wrapentity: ActionParams.wrapentity;
1224
1206
  }
1225
1207
  type ActionNames = keyof ActionNameParams;
1226
1208
  interface ActionReturnValues {
1227
1209
  cancel: Types.cancel_results;
1228
1210
  craft: Types.task_results;
1211
+ demolish: Types.task_results;
1229
1212
  deploy: Types.task_results;
1230
1213
  descentity: string;
1231
1214
  gather: Types.task_results;
1232
1215
  getconfig: Types.game_config;
1216
+ geteligible: UInt16[];
1233
1217
  getentities: Types.entity_info[];
1234
1218
  getentity: Types.entity_info;
1235
1219
  getitemdata: Types.itemdata_result;
@@ -1258,8 +1242,10 @@ interface ActionReturnValues {
1258
1242
  resolve: Types.resolve_results;
1259
1243
  transfer: Types.task_results;
1260
1244
  travel: Types.task_results;
1245
+ undeploy: Types.task_results;
1261
1246
  warp: Types.task_results;
1262
1247
  wrap: Types.task_results;
1248
+ wrapentity: Types.task_results;
1263
1249
  }
1264
1250
  type ActionReturnNames = keyof ActionReturnValues;
1265
1251
  declare class Contract extends Contract$2 {
@@ -1393,12 +1379,13 @@ declare const INSUFFICIENT_ITEM_SUPPLY = "Insufficient supply of item at locatio
1393
1379
 
1394
1380
  declare const PRECISION = 10000;
1395
1381
  declare const CRAFT_ENERGY_DIVISOR = 150000;
1396
- declare const WAREHOUSE_Z = 500;
1382
+ declare const PLANETARY_STRUCTURE_Z = 0;
1397
1383
  declare const CONTAINER_Z = 300;
1398
1384
  declare const TRAVEL_MAX_DURATION = 86400;
1399
1385
  declare const MIN_ORBITAL_ALTITUDE = 800;
1400
1386
  declare const MAX_ORBITAL_ALTITUDE = 3000;
1401
1387
  declare const BASE_ORBITAL_MASS = 100000;
1388
+ declare const MIN_TRANSFER_DISTANCE = 100;
1402
1389
  interface ShipLike {
1403
1390
  coordinates: Types.coordinates;
1404
1391
  hullmass?: UInt32;
@@ -1424,25 +1411,23 @@ declare enum TaskType {
1424
1411
  CRAFT = 7,
1425
1412
  DEPLOY = 8,
1426
1413
  WRAP = 9,
1427
- UNWRAP = 10
1414
+ UNWRAP = 10,
1415
+ UNDEPLOY = 11,
1416
+ WRAP_ENTITY = 12,
1417
+ DEMOLISH = 13
1428
1418
  }
1429
1419
  declare enum LocationType {
1430
1420
  EMPTY = 0,
1431
1421
  PLANET = 1,
1432
1422
  ASTEROID = 2,
1433
- NEBULA = 3
1423
+ NEBULA = 3,
1424
+ ICE_FIELD = 4
1434
1425
  }
1435
1426
  declare enum TaskCancelable {
1436
1427
  NEVER = 0,
1437
1428
  BEFORE_START = 1,
1438
1429
  ALWAYS = 2
1439
1430
  }
1440
- declare const EntityType$1: {
1441
- readonly SHIP: Name;
1442
- readonly WAREHOUSE: Name;
1443
- readonly CONTAINER: Name;
1444
- };
1445
- type EntityTypeName = (typeof EntityType$1)[keyof typeof EntityType$1];
1446
1431
  type CoordinatesType = Coordinates | Types.coordinates | {
1447
1432
  x: Int64Type;
1448
1433
  y: Int64Type;
@@ -1475,6 +1460,7 @@ interface Item {
1475
1460
  moduleType?: ModuleType;
1476
1461
  }
1477
1462
  declare function formatTier(tier: number): string;
1463
+ declare function tierAdjective(tier: number): string;
1478
1464
 
1479
1465
  declare const ITEM_ORE_T1 = 101;
1480
1466
  declare const ITEM_ORE_T2 = 102;
@@ -1543,9 +1529,11 @@ declare const ITEM_LOADER_T1 = 10103;
1543
1529
  declare const ITEM_CRAFTER_T1 = 10104;
1544
1530
  declare const ITEM_STORAGE_T1 = 10105;
1545
1531
  declare const ITEM_HAULER_T1 = 10106;
1532
+ declare const ITEM_WARP_T1 = 10107;
1546
1533
  declare const ITEM_CONTAINER_T1_PACKED = 10200;
1547
1534
  declare const ITEM_SHIP_T1_PACKED = 10201;
1548
1535
  declare const ITEM_WAREHOUSE_T1_PACKED = 10202;
1536
+ declare const ITEM_EXTRACTOR_T1_PACKED = 10203;
1549
1537
  declare const ITEM_HULL_PLATES_T2 = 20001;
1550
1538
  declare const ITEM_CARGO_LINING_T2 = 20002;
1551
1539
  declare const ITEM_CONTAINER_T2_PACKED = 20200;
@@ -1575,6 +1563,7 @@ interface Recipe {
1575
1563
  }
1576
1564
  interface EntitySlot {
1577
1565
  type: ModuleType;
1566
+ outputPct: number;
1578
1567
  }
1579
1568
  interface EntityLayout {
1580
1569
  entityItemId: number;
@@ -1622,10 +1611,6 @@ declare class GameState extends Types.state_row {
1622
1611
  * Check if the game is currently enabled
1623
1612
  */
1624
1613
  get isEnabled(): boolean;
1625
- /**
1626
- * Get the total number of ships in the game
1627
- */
1628
- get shipCount(): number;
1629
1614
  /**
1630
1615
  * Get the current salt value (used for random number generation)
1631
1616
  */
@@ -1662,7 +1647,6 @@ declare class GameState extends Types.state_row {
1662
1647
  get summary(): {
1663
1648
  enabled: boolean;
1664
1649
  epoch: string;
1665
- ships: number;
1666
1650
  hasSeed: boolean;
1667
1651
  hasCommit: boolean;
1668
1652
  };
@@ -1718,10 +1702,10 @@ declare function deriveStrata(coords: CoordinatesType, gameSeed: Checksum256Type
1718
1702
  declare function deriveLocationSize(loc: Types.location_static): number;
1719
1703
 
1720
1704
  declare const DEPTH_THRESHOLD_T1 = 0;
1721
- declare const DEPTH_THRESHOLD_T2 = 2000;
1722
- declare const DEPTH_THRESHOLD_T3 = 10000;
1723
- declare const DEPTH_THRESHOLD_T4 = 30000;
1724
- declare const DEPTH_THRESHOLD_T5 = 55000;
1705
+ declare const DEPTH_THRESHOLD_T2 = 1500;
1706
+ declare const DEPTH_THRESHOLD_T3 = 5000;
1707
+ declare const DEPTH_THRESHOLD_T4 = 12000;
1708
+ declare const DEPTH_THRESHOLD_T5 = 22000;
1725
1709
  declare const LOCATION_MIN_DEPTH = 500;
1726
1710
  declare const LOCATION_MAX_DEPTH = 65535;
1727
1711
  declare const PLANET_SUBTYPE_GAS_GIANT = 0;
@@ -1733,6 +1717,11 @@ declare const PLANET_SUBTYPE_INDUSTRIAL = 5;
1733
1717
  declare function getDepthThreshold(tier: number): number;
1734
1718
  declare function getResourceTier(itemId: number): number;
1735
1719
  declare function getResourceWeight(itemId: number, stratum: number): number;
1720
+ interface LocationProfileEntry {
1721
+ category: number;
1722
+ maxTier: number;
1723
+ }
1724
+ declare function getLocationProfile(locationType: number, subtype: number): LocationProfileEntry[];
1736
1725
  declare function getLocationCandidates(locationType: number, subtype: number): number[];
1737
1726
  declare function getEligibleResources(locationType: number, subtype: number, stratum: number): number[];
1738
1727
 
@@ -1830,9 +1819,6 @@ declare class LocationsManager extends BaseManager {
1830
1819
  hasSystem(location: CoordinatesType): Promise<boolean>;
1831
1820
  findNearbyPlanets(origin: CoordinatesType, maxDistance?: UInt16Type): Promise<Distance[]>;
1832
1821
  getStrata(coords: CoordinatesType): Promise<LocationStratum[]>;
1833
- getLocationEntity(id: UInt64Type): Promise<Types.location_row | undefined>;
1834
- getLocationEntityAt(coords: CoordinatesType): Promise<Types.location_row | undefined>;
1835
- getAllLocationEntities(): Promise<Types.location_row[]>;
1836
1822
  }
1837
1823
 
1838
1824
  declare class EpochsManager extends BaseManager {
@@ -1845,26 +1831,30 @@ declare class EpochsManager extends BaseManager {
1845
1831
  }
1846
1832
 
1847
1833
  type EntityRefInput = {
1848
- entityType: EntityTypeName;
1834
+ entityType: NameType;
1849
1835
  entityId: UInt64Type;
1850
1836
  };
1851
1837
  declare class ActionsManager extends BaseManager {
1852
1838
  travel(shipId: UInt64Type, destination: CoordinatesType, recharge?: boolean): Action;
1853
1839
  grouptravel(entities: EntityRefInput[], destination: CoordinatesType, recharge?: boolean): Action;
1854
- resolve(entityId: UInt64Type, entityType?: EntityTypeName, count?: UInt64Type): Action;
1855
- cancel(entityId: UInt64Type, count: UInt64Type, entityType?: EntityTypeName): Action;
1856
- recharge(entityId: UInt64Type, entityType?: EntityTypeName): Action;
1857
- transfer(sourceType: EntityTypeName, sourceId: UInt64Type, destType: EntityTypeName, destId: UInt64Type, itemId: UInt64Type, stats: UInt64Type, quantity: UInt64Type): Action;
1840
+ resolve(entityId: UInt64Type, count?: UInt64Type): Action;
1841
+ cancel(entityId: UInt64Type, count: UInt64Type): Action;
1842
+ recharge(entityId: UInt64Type): Action;
1843
+ refrshentity(entityId: UInt64Type): Action;
1844
+ transfer(sourceId: UInt64Type, destId: UInt64Type, items: ActionParams.Type.cargo_item[]): Action;
1858
1845
  foundCompany(account: NameType, name: string): Action;
1859
1846
  join(account: NameType): Action;
1860
- gather(source: EntityRefInput, destination: EntityRefInput, stratum: UInt16Type, quantity: UInt32Type): Action;
1861
- warp(entityId: UInt64Type, destination: CoordinatesType, entityType?: EntityTypeName): Action;
1862
- craft(entityType: EntityTypeName, entityId: UInt64Type, recipeId: number, quantity: number, inputs: ActionParams.Type.cargo_item[]): Action;
1863
- blend(entityType: EntityTypeName, entityId: UInt64Type, inputs: ActionParams.Type.cargo_item[]): Action;
1864
- deploy(entityType: EntityTypeName, entityId: UInt64Type, packedItemId: number, stats: bigint): Action;
1865
- addmodule(entityType: EntityTypeName, entityId: UInt64Type, moduleIndex: number, moduleCargoId: UInt64Type, targetCargoId?: UInt64Type): Action;
1866
- rmmodule(entityType: EntityTypeName, entityId: UInt64Type, moduleIndex: number, targetCargoId?: UInt64Type): Action;
1867
- wrap(owner: NameType, entityType: EntityTypeName, entityId: UInt64Type, cargoId: UInt64Type, quantity: UInt64Type): Action;
1847
+ gather(sourceId: UInt64Type, destinationId: UInt64Type, stratum: UInt16Type, quantity: UInt32Type): Action;
1848
+ warp(entityId: UInt64Type, destination: CoordinatesType): Action;
1849
+ craft(entityId: UInt64Type, recipeId: number, quantity: number, inputs: ActionParams.Type.cargo_item[]): Action;
1850
+ blend(entityId: UInt64Type, inputs: ActionParams.Type.cargo_item[]): Action;
1851
+ deploy(entityId: UInt64Type, ref: ActionParams.Type.cargo_ref): Action;
1852
+ addmodule(entityId: UInt64Type, moduleIndex: number, moduleRef: ActionParams.Type.cargo_ref, targetRef?: ActionParams.Type.cargo_ref | null): Action;
1853
+ rmmodule(entityId: UInt64Type, moduleIndex: number, targetRef?: ActionParams.Type.cargo_ref | null): Action;
1854
+ wrap(owner: NameType, entityId: UInt64Type, nexusId: UInt64Type, items: ActionParams.Type.cargo_item[]): Action;
1855
+ undeploy(hostId: UInt64Type, targetId: UInt64Type): Action;
1856
+ wrapEntity(entityId: UInt64Type, nexusId: UInt64Type): Action;
1857
+ demolish(entityId: UInt64Type): Action;
1868
1858
  joinGame(account: NameType, companyName: string): Action[];
1869
1859
  }
1870
1860
 
@@ -1973,6 +1963,104 @@ type ErrorMessage = {
1973
1963
  };
1974
1964
  type ServerMessage = AckMessage | SnapshotMessage | UpdateMessage | BoundsDeltaMessage | EventMessage | EventCatchupCompleteMessage | PongMessage | ErrorMessage;
1975
1965
 
1966
+ /**
1967
+ * Travel calculations for ship movement, energy usage, and flight times.
1968
+ *
1969
+ * Functions prefixed with `calc_` are contract-parity functions that mirror
1970
+ * the C++ implementation in the server contract (schedule.cpp, ship.cpp).
1971
+ * These use snake_case intentionally to match the contract naming convention
1972
+ * and signal that they must produce identical results to the on-chain code.
1973
+ *
1974
+ * Functions prefixed with `calculate` are higher-level SDK helpers that may
1975
+ * combine multiple contract calculations for convenience.
1976
+ */
1977
+
1978
+ declare function calc_orbital_altitude(mass: number): number;
1979
+ declare function distanceBetweenCoordinates(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): UInt64;
1980
+ declare function distanceBetweenPoints(x1: Int64Type, y1: Int64Type, x2: Int64Type, y2: Int64Type): UInt64;
1981
+ declare function lerp(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates, time: number): ActionParams.Type.coordinates;
1982
+ interface FloatPosition {
1983
+ x: number;
1984
+ y: number;
1985
+ }
1986
+ declare function easeFlightProgress(t: number): number;
1987
+ declare function flightSpeedFactor(t: number): number;
1988
+ declare function interpolateFlightPosition(origin: {
1989
+ x: Int64Type | number;
1990
+ y: Int64Type | number;
1991
+ }, destination: {
1992
+ x: Int64Type | number;
1993
+ y: Int64Type | number;
1994
+ }, taskProgress: number, options?: {
1995
+ easing?: 'physics' | 'linear';
1996
+ }): FloatPosition;
1997
+ declare function getInterpolatedPosition(entity: HasScheduleAndLocation, taskIndex: number, taskProgress: number): FloatPosition;
1998
+ declare function rotation(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): number;
1999
+ declare function findNearbyPlanets(seed: Checksum256, origin: ActionParams.Type.coordinates, maxDistance?: UInt64Type): Distance[];
2000
+ declare function calc_rechargetime(capacity: UInt32Type, energy: UInt32Type, recharge: UInt32Type): UInt32;
2001
+ declare function calc_ship_rechargetime(ship: ShipLike): UInt32;
2002
+ declare function calc_flighttime(distance: UInt64Type, acceleration: number): UInt32;
2003
+ declare function calc_loader_flighttime(ship: ShipLike, mass: UInt64, altitude?: number): UInt32;
2004
+ declare function calc_loader_acceleration(ship: ShipLike, mass: UInt64): number;
2005
+ declare function calc_ship_flighttime(ship: ShipLike, mass: UInt64, distance: UInt64): UInt32;
2006
+ declare function calc_ship_acceleration(ship: ShipLike, mass: UInt64): number;
2007
+ declare function calc_acceleration(thrust: number, mass: number): number;
2008
+ declare function calc_ship_mass(ship: ShipLike, cargos: CargoMassInfo[]): UInt64;
2009
+ declare function calc_energyusage(distance: UInt64Type, drain: UInt32Type): UInt32;
2010
+ declare function calculateTransferTime(ship: ShipLike, cargos: CargoMassInfo[], quantities?: Map<number, number>): UInt32;
2011
+ declare function calculateRefuelingTime(ship: ShipLike): UInt32;
2012
+ declare function calculateFlightTime(ship: ShipLike, cargos: CargoMassInfo[], distance: UInt64Type): UInt32;
2013
+ interface LoadTimeBreakdown {
2014
+ unloadTime: number;
2015
+ loadTime: number;
2016
+ totalTime: number;
2017
+ unloadMass: number;
2018
+ loadMass: number;
2019
+ }
2020
+ declare function calculateLoadTimeBreakdown(ship: ShipLike, cargos: CargoMassInfo[], loadQuantities?: Map<number, number>, unloadQuantities?: Map<number, number>): LoadTimeBreakdown;
2021
+ interface EstimatedTravelTime {
2022
+ flightTime: UInt32;
2023
+ rechargeTime: UInt32;
2024
+ loadTime: UInt32;
2025
+ unloadTime: UInt32;
2026
+ total: UInt32;
2027
+ }
2028
+ interface EstimateTravelTimeOptions {
2029
+ needsRecharge?: boolean;
2030
+ loadMass?: UInt32Type;
2031
+ unloadMass?: UInt32Type;
2032
+ }
2033
+ declare function estimateTravelTime(ship: ShipLike, travelMass: UInt64Type, distance: UInt64Type, options?: EstimateTravelTimeOptions): EstimatedTravelTime;
2034
+ declare function estimateDealTravelTime(ship: ShipLike, shipMass: UInt64Type, distance: UInt64Type, loadMass: UInt32Type): UInt32;
2035
+ declare function hasEnergyForDistance(ship: ShipLike, distance: UInt64Type): boolean;
2036
+ interface TransferEntity {
2037
+ location: {
2038
+ z?: {
2039
+ toNumber(): number;
2040
+ } | number;
2041
+ };
2042
+ loaders?: {
2043
+ thrust: {
2044
+ toNumber(): number;
2045
+ } | number;
2046
+ mass: {
2047
+ toNumber(): number;
2048
+ } | number;
2049
+ quantity: {
2050
+ toNumber(): number;
2051
+ } | number;
2052
+ };
2053
+ }
2054
+ interface HasScheduleAndLocation {
2055
+ coordinates: ActionParams.Type.coordinates;
2056
+ schedule?: Types.schedule;
2057
+ }
2058
+ declare function getFlightOrigin(entity: HasScheduleAndLocation, flightTaskIndex: number): ActionParams.Type.coordinates;
2059
+ declare function getDestinationLocation(entity: HasScheduleAndLocation): ActionParams.Type.coordinates | undefined;
2060
+ /** Returns chain-tile coordinates (rounded). For visual position use getInterpolatedPosition. */
2061
+ declare function getPositionAt(entity: HasScheduleAndLocation, taskIndex: number, taskProgress: number): ActionParams.Type.coordinates;
2062
+ declare function calc_transfer_duration(source: TransferEntity, dest: TransferEntity, cargoMass: number): number;
2063
+
1976
2064
  interface MovementCapability {
1977
2065
  engines: Types.movement_stats;
1978
2066
  generator: Types.energy_stats;
@@ -2097,6 +2185,7 @@ declare function getTaskRemaining(entity: ScheduleData, index: number, now: Date
2097
2185
  declare function isTaskComplete(entity: ScheduleData, index: number, now: Date): boolean;
2098
2186
  declare function isTaskInProgress(entity: ScheduleData, index: number, now: Date): boolean;
2099
2187
  declare function currentTaskProgress(entity: ScheduleData, now: Date): number;
2188
+ declare function currentTaskProgressFloat(entity: ScheduleData, now: Date): number;
2100
2189
  declare function scheduleProgress(entity: ScheduleData, now: Date): number;
2101
2190
  declare function isTaskType(entity: ScheduleData, taskType: TaskType, now: Date): boolean;
2102
2191
  declare function isInFlight(entity: ScheduleData, now: Date): boolean;
@@ -2122,6 +2211,7 @@ declare const schedule_getTaskRemaining: typeof getTaskRemaining;
2122
2211
  declare const schedule_isTaskComplete: typeof isTaskComplete;
2123
2212
  declare const schedule_isTaskInProgress: typeof isTaskInProgress;
2124
2213
  declare const schedule_currentTaskProgress: typeof currentTaskProgress;
2214
+ declare const schedule_currentTaskProgressFloat: typeof currentTaskProgressFloat;
2125
2215
  declare const schedule_scheduleProgress: typeof scheduleProgress;
2126
2216
  declare const schedule_isTaskType: typeof isTaskType;
2127
2217
  declare const schedule_isInFlight: typeof isInFlight;
@@ -2149,6 +2239,7 @@ declare namespace schedule {
2149
2239
  schedule_isTaskComplete as isTaskComplete,
2150
2240
  schedule_isTaskInProgress as isTaskInProgress,
2151
2241
  schedule_currentTaskProgress as currentTaskProgress,
2242
+ schedule_currentTaskProgressFloat as currentTaskProgressFloat,
2152
2243
  schedule_scheduleProgress as scheduleProgress,
2153
2244
  schedule_isTaskType as isTaskType,
2154
2245
  schedule_isInFlight as isInFlight,
@@ -2241,6 +2332,7 @@ declare class ScheduleAccessor {
2241
2332
  taskComplete(index: number, now: Date): boolean;
2242
2333
  taskInProgress(index: number, now: Date): boolean;
2243
2334
  currentTaskProgress(now: Date): number;
2335
+ currentTaskProgressFloat(now: Date): number;
2244
2336
  progress(now: Date): number;
2245
2337
  }
2246
2338
  declare function createScheduleAccessor(entity: ScheduleData): ScheduleAccessor;
@@ -2293,6 +2385,8 @@ declare class Ship extends Types.entity_info {
2293
2385
  private _sched?;
2294
2386
  private _inv?;
2295
2387
  get name(): string;
2388
+ get entityClass(): 'mobile';
2389
+ get canUndeploy(): boolean;
2296
2390
  get inv(): InventoryAccessor;
2297
2391
  get inventory(): EntityInventory[];
2298
2392
  get sched(): ScheduleAccessor;
@@ -2300,7 +2394,9 @@ declare class Ship extends Types.entity_info {
2300
2394
  get isIdle(): boolean;
2301
2395
  getFlightOrigin(flightTaskIndex: number): Coordinates;
2302
2396
  destinationLocation(): Coordinates | undefined;
2397
+ /** Chain-tile coordinates at `now`. For smooth visual position use interpolatedPositionAt. */
2303
2398
  positionAt(now: Date): Coordinates;
2399
+ interpolatedPositionAt(now: Date): FloatPosition;
2304
2400
  isInFlight(now: Date): boolean;
2305
2401
  isRecharging(now: Date): boolean;
2306
2402
  isLoading(now: Date): boolean;
@@ -2328,6 +2424,12 @@ declare class Ship extends Types.entity_info {
2328
2424
  hasEnergyFor(distance: UInt64): boolean;
2329
2425
  }
2330
2426
 
2427
+ interface InstalledModule {
2428
+ slotIndex: number;
2429
+ itemId: number;
2430
+ stats: bigint;
2431
+ }
2432
+
2331
2433
  interface WarehouseStateInput {
2332
2434
  id: UInt64Type;
2333
2435
  owner: string;
@@ -2347,6 +2449,8 @@ declare class Warehouse extends Types.entity_info {
2347
2449
  private _sched?;
2348
2450
  private _inv?;
2349
2451
  get name(): string;
2452
+ get entityClass(): 'building';
2453
+ get canDemolish(): boolean;
2350
2454
  get inv(): InventoryAccessor;
2351
2455
  get inventory(): EntityInventory[];
2352
2456
  get sched(): ScheduleAccessor;
@@ -2363,10 +2467,7 @@ declare class Warehouse extends Types.entity_info {
2363
2467
  get orbitalAltitude(): number;
2364
2468
  get totalMass(): UInt64;
2365
2469
  }
2366
- declare function computeWarehouseCapabilities(modules: {
2367
- itemId: number;
2368
- stats: bigint;
2369
- }[]): {
2470
+ declare function computeWarehouseCapabilities(modules: InstalledModule[], layout: EntitySlot[]): {
2370
2471
  loaders?: {
2371
2472
  mass: number;
2372
2473
  thrust: number;
@@ -2392,8 +2493,11 @@ interface ContainerStateInput {
2392
2493
  declare class Container extends Types.entity_info {
2393
2494
  private _sched?;
2394
2495
  get name(): string;
2496
+ get entityClass(): 'mobile';
2497
+ get canUndeploy(): boolean;
2395
2498
  get sched(): ScheduleAccessor;
2396
2499
  get isIdle(): boolean;
2500
+ interpolatedPositionAt(now: Date): FloatPosition;
2397
2501
  isLoading(now: Date): boolean;
2398
2502
  isUnloading(now: Date): boolean;
2399
2503
  get location(): Location;
@@ -2417,6 +2521,9 @@ type SubscriptionEntityType = 'ship' | 'warehouse' | 'container';
2417
2521
  type EntityInstance = Ship | Warehouse | Container;
2418
2522
  interface SubscriptionsOptions {
2419
2523
  url: string;
2524
+ minReconnectDelay?: number;
2525
+ pingIntervalMs?: number;
2526
+ pongTimeoutMs?: number;
2420
2527
  }
2421
2528
  interface BoundsSubscriptionHandle {
2422
2529
  readonly subId: string;
@@ -2424,6 +2531,11 @@ interface BoundsSubscriptionHandle {
2424
2531
  updateBounds(bounds: BoundingBox): void;
2425
2532
  current: Map<number, EntityInstance>;
2426
2533
  }
2534
+ interface OwnerSubscriptionHandle {
2535
+ readonly subId: string;
2536
+ unsubscribe(): void;
2537
+ current: Map<number, EntityInstance>;
2538
+ }
2427
2539
  interface EntitySubscriptionHandle {
2428
2540
  readonly subId: string;
2429
2541
  readonly entityType: SubscriptionEntityType;
@@ -2436,6 +2548,7 @@ declare class SubscriptionsManager {
2436
2548
  private readonly entitySubs;
2437
2549
  private readonly boundsSubs;
2438
2550
  private subCounter;
2551
+ private hasConnected;
2439
2552
  constructor(opts: SubscriptionsOptions);
2440
2553
  close(): void;
2441
2554
  private generateSubID;
@@ -2449,8 +2562,13 @@ declare class SubscriptionsManager {
2449
2562
  owner?: string;
2450
2563
  prioritizeOwner?: string;
2451
2564
  }): BoundsSubscriptionHandle;
2565
+ subscribeOwner(owner: string, handlers?: {
2566
+ onSnapshot?: (entities: EntityInstance[]) => void;
2567
+ onUpdate?: (entity: EntityInstance) => void;
2568
+ }): OwnerSubscriptionHandle;
2452
2569
  private unsubscribeBounds;
2453
2570
  private updateBounds;
2571
+ private onStateChange;
2454
2572
  private onMessage;
2455
2573
  private parseEntity;
2456
2574
  private handleSnapshot;
@@ -2496,20 +2614,70 @@ declare abstract class BaseManager {
2496
2614
  protected getState(): Promise<GameState>;
2497
2615
  }
2498
2616
 
2499
- type EntityType = 'ship' | 'warehouse' | 'container' | 'location';
2617
+ interface ExtractorStateInput {
2618
+ id: UInt64Type;
2619
+ owner: string;
2620
+ name: string;
2621
+ coordinates: CoordinatesType | {
2622
+ x: number;
2623
+ y: number;
2624
+ z?: number;
2625
+ };
2626
+ hullmass?: number;
2627
+ capacity?: number;
2628
+ energy?: number;
2629
+ modules?: PackedModuleInput[];
2630
+ schedule?: Types.schedule;
2631
+ cargo?: Types.cargo_item[];
2632
+ }
2633
+ declare class Extractor extends Types.entity_info {
2634
+ private _sched?;
2635
+ private _inv?;
2636
+ get name(): string;
2637
+ get entityClass(): 'building';
2638
+ get canDemolish(): boolean;
2639
+ get inv(): InventoryAccessor;
2640
+ get inventory(): EntityInventory[];
2641
+ get sched(): ScheduleAccessor;
2642
+ get isIdle(): boolean;
2643
+ get location(): Location;
2644
+ get totalCargoMass(): UInt64;
2645
+ get maxCapacity(): UInt64;
2646
+ get availableCapacity(): UInt64;
2647
+ get isFull(): boolean;
2648
+ get totalMass(): UInt64;
2649
+ }
2650
+ interface ExtractorCapabilities {
2651
+ generator?: {
2652
+ capacity: number;
2653
+ recharge: number;
2654
+ };
2655
+ gatherer?: {
2656
+ yield: number;
2657
+ drain: number;
2658
+ depth: number;
2659
+ speed: number;
2660
+ };
2661
+ }
2662
+ declare function computeExtractorCapabilities(modules: InstalledModule[], layout: EntitySlot[]): ExtractorCapabilities;
2663
+
2664
+ type EntityType = 'ship' | 'warehouse' | 'extractor' | 'container';
2500
2665
  declare class EntitiesManager extends BaseManager {
2501
- getEntity(type: EntityType, id: UInt64Type): Promise<Ship | Warehouse | Container>;
2502
- getEntities(owner: NameType | Types.player_row, type?: EntityType): Promise<(Ship | Warehouse | Container)[]>;
2666
+ getEntity(id: UInt64Type): Promise<Ship | Warehouse | Extractor | Container>;
2667
+ getEntities(owner: NameType | Types.player_row, type?: EntityType): Promise<(Ship | Warehouse | Extractor | Container)[]>;
2503
2668
  getSummaries(owner: NameType | Types.player_row, type?: EntityType): Promise<Types.entity_summary[]>;
2504
2669
  getShip(id: UInt64Type): Promise<Ship>;
2505
2670
  getWarehouse(id: UInt64Type): Promise<Warehouse>;
2506
2671
  getContainer(id: UInt64Type): Promise<Container>;
2672
+ getExtractor(id: UInt64Type): Promise<Extractor>;
2507
2673
  getShips(owner: NameType | Types.player_row): Promise<Ship[]>;
2508
2674
  getWarehouses(owner: NameType | Types.player_row): Promise<Warehouse[]>;
2509
2675
  getContainers(owner: NameType | Types.player_row): Promise<Container[]>;
2676
+ getExtractors(owner: NameType | Types.player_row): Promise<Extractor[]>;
2510
2677
  getShipSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
2511
2678
  getWarehouseSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
2512
2679
  getContainerSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
2680
+ getExtractorSummaries(owner: NameType | Types.player_row): Promise<Types.entity_summary[]>;
2513
2681
  private wrapEntity;
2514
2682
  private resolveOwner;
2515
2683
  }
@@ -2543,6 +2711,7 @@ declare class Shipload {
2543
2711
 
2544
2712
  declare function makeShip(state: ShipStateInput): Ship;
2545
2713
  declare function makeWarehouse(state: WarehouseStateInput): Warehouse;
2714
+ declare function makeExtractor(state: ExtractorStateInput): Extractor;
2546
2715
  declare function makeContainer(state: ContainerStateInput): Container;
2547
2716
 
2548
2717
  declare const itemIds: number[];
@@ -2565,7 +2734,6 @@ declare function getEntityItems(opts?: {
2565
2734
  declare function resolveItemCategory(id: number): ResourceCategory | undefined;
2566
2735
  declare function typeLabel(type: ItemType | number): string;
2567
2736
  declare function categoryLabel(cat: ResourceCategory): string;
2568
- declare function tierLabel(tier: number): string;
2569
2737
  declare function categoryFromIndex(i: number): ResourceCategory | undefined;
2570
2738
  declare function categoryLabelFromIndex(i: number): string;
2571
2739
 
@@ -2575,93 +2743,12 @@ declare function getLocationTypeName(type: LocationType): string;
2575
2743
  declare function getSystemName(gameSeed: Checksum256Type, location: CoordinatesType): string;
2576
2744
  declare function hasSystem(gameSeed: Checksum256Type, coordinates: CoordinatesType): boolean;
2577
2745
  declare function deriveLocationStatic(gameSeed: Checksum256Type, coordinates: CoordinatesType): Types.location_static;
2578
- declare function deriveLocationEpoch(epochSeed: Checksum256Type, coordinates: CoordinatesType): Types.location_epoch;
2579
- declare function deriveLocation(gameSeed: Checksum256Type, epochSeed: Checksum256Type, coordinates: CoordinatesType): Types.location_derived;
2746
+ declare function isLocationBuildable(gameSeed: Checksum256Type, coordinates: CoordinatesType): boolean;
2747
+ declare function deriveLocation(gameSeed: Checksum256Type, coordinates: CoordinatesType): Types.location_derived;
2580
2748
 
2581
2749
  declare function hash(seed: Checksum256Type, string: string): Checksum256;
2582
2750
  declare function hash512(seed: Checksum256Type, string: string): Checksum512;
2583
2751
 
2584
- /**
2585
- * Travel calculations for ship movement, energy usage, and flight times.
2586
- *
2587
- * Functions prefixed with `calc_` are contract-parity functions that mirror
2588
- * the C++ implementation in the server contract (schedule.cpp, ship.cpp).
2589
- * These use snake_case intentionally to match the contract naming convention
2590
- * and signal that they must produce identical results to the on-chain code.
2591
- *
2592
- * Functions prefixed with `calculate` are higher-level SDK helpers that may
2593
- * combine multiple contract calculations for convenience.
2594
- */
2595
-
2596
- declare function calc_orbital_altitude(mass: number): number;
2597
- declare function distanceBetweenCoordinates(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): UInt64;
2598
- declare function distanceBetweenPoints(x1: Int64Type, y1: Int64Type, x2: Int64Type, y2: Int64Type): UInt64;
2599
- declare function lerp(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates, time: number): ActionParams.Type.coordinates;
2600
- declare function rotation(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): number;
2601
- declare function findNearbyPlanets(seed: Checksum256, origin: ActionParams.Type.coordinates, maxDistance?: UInt64Type): Distance[];
2602
- declare function calc_rechargetime(capacity: UInt32Type, energy: UInt32Type, recharge: UInt32Type): UInt32;
2603
- declare function calc_ship_rechargetime(ship: ShipLike): UInt32;
2604
- declare function calc_flighttime(distance: UInt64Type, acceleration: number): UInt32;
2605
- declare function calc_loader_flighttime(ship: ShipLike, mass: UInt64, altitude?: number): UInt32;
2606
- declare function calc_loader_acceleration(ship: ShipLike, mass: UInt64): number;
2607
- declare function calc_ship_flighttime(ship: ShipLike, mass: UInt64, distance: UInt64): UInt32;
2608
- declare function calc_ship_acceleration(ship: ShipLike, mass: UInt64): number;
2609
- declare function calc_acceleration(thrust: number, mass: number): number;
2610
- declare function calc_ship_mass(ship: ShipLike, cargos: CargoMassInfo[]): UInt64;
2611
- declare function calc_energyusage(distance: UInt64Type, drain: UInt32Type): UInt32;
2612
- declare function calculateTransferTime(ship: ShipLike, cargos: CargoMassInfo[], quantities?: Map<number, number>): UInt32;
2613
- declare function calculateRefuelingTime(ship: ShipLike): UInt32;
2614
- declare function calculateFlightTime(ship: ShipLike, cargos: CargoMassInfo[], distance: UInt64Type): UInt32;
2615
- interface LoadTimeBreakdown {
2616
- unloadTime: number;
2617
- loadTime: number;
2618
- totalTime: number;
2619
- unloadMass: number;
2620
- loadMass: number;
2621
- }
2622
- declare function calculateLoadTimeBreakdown(ship: ShipLike, cargos: CargoMassInfo[], loadQuantities?: Map<number, number>, unloadQuantities?: Map<number, number>): LoadTimeBreakdown;
2623
- interface EstimatedTravelTime {
2624
- flightTime: UInt32;
2625
- rechargeTime: UInt32;
2626
- loadTime: UInt32;
2627
- unloadTime: UInt32;
2628
- total: UInt32;
2629
- }
2630
- interface EstimateTravelTimeOptions {
2631
- needsRecharge?: boolean;
2632
- loadMass?: UInt32Type;
2633
- unloadMass?: UInt32Type;
2634
- }
2635
- declare function estimateTravelTime(ship: ShipLike, travelMass: UInt64Type, distance: UInt64Type, options?: EstimateTravelTimeOptions): EstimatedTravelTime;
2636
- declare function estimateDealTravelTime(ship: ShipLike, shipMass: UInt64Type, distance: UInt64Type, loadMass: UInt32Type): UInt32;
2637
- declare function hasEnergyForDistance(ship: ShipLike, distance: UInt64Type): boolean;
2638
- interface TransferEntity {
2639
- location: {
2640
- z?: {
2641
- toNumber(): number;
2642
- } | number;
2643
- };
2644
- loaders?: {
2645
- thrust: {
2646
- toNumber(): number;
2647
- } | number;
2648
- mass: {
2649
- toNumber(): number;
2650
- } | number;
2651
- quantity: {
2652
- toNumber(): number;
2653
- } | number;
2654
- };
2655
- }
2656
- interface HasScheduleAndLocation {
2657
- coordinates: ActionParams.Type.coordinates;
2658
- schedule?: Types.schedule;
2659
- }
2660
- declare function getFlightOrigin(entity: HasScheduleAndLocation, flightTaskIndex: number): ActionParams.Type.coordinates;
2661
- declare function getDestinationLocation(entity: HasScheduleAndLocation): ActionParams.Type.coordinates | undefined;
2662
- declare function getPositionAt(entity: HasScheduleAndLocation, taskIndex: number, taskProgress: number): ActionParams.Type.coordinates;
2663
- declare function calc_transfer_duration(source: TransferEntity, dest: TransferEntity, cargoMass: number): number;
2664
-
2665
2752
  interface CargoData {
2666
2753
  cargo: EntityInventory[];
2667
2754
  }
@@ -2697,6 +2784,27 @@ declare namespace cargoUtils {
2697
2784
  };
2698
2785
  }
2699
2786
 
2787
+ declare function cargoRef(src: {
2788
+ item_id: number;
2789
+ stats: bigint | number;
2790
+ modules?: Types.module_entry[];
2791
+ }): ActionParams.Type.cargo_ref;
2792
+ declare function cargoItem(src: {
2793
+ item_id: number;
2794
+ stats: bigint | number;
2795
+ modules?: Types.module_entry[];
2796
+ }, quantity: bigint | number): ActionParams.Type.cargo_item;
2797
+
2798
+ type TaskCargoDirection = 'in' | 'out';
2799
+ interface TaskCargoChange {
2800
+ direction: TaskCargoDirection;
2801
+ item_id: number;
2802
+ stats: bigint;
2803
+ modules: Types.module_entry[];
2804
+ quantity: number;
2805
+ }
2806
+ declare function taskCargoChanges(task: Types.task): TaskCargoChange[];
2807
+
2700
2808
  interface Entity {
2701
2809
  id: UInt64;
2702
2810
  type: Name;
@@ -2711,6 +2819,43 @@ type WarehouseEntity = Entity & StorageCapability & Partial<LoaderCapability> &
2711
2819
  type ContainerEntity = Entity & StorageCapability & MassCapability & ScheduleCapability;
2712
2820
  type AnyEntity = ShipEntity | WarehouseEntity | ContainerEntity;
2713
2821
 
2822
+ declare const ENTITY_SHIP: Name;
2823
+ declare const ENTITY_WAREHOUSE: Name;
2824
+ declare const ENTITY_EXTRACTOR: Name;
2825
+ declare const ENTITY_CONTAINER: Name;
2826
+ declare enum EntityClass {
2827
+ OrbitalVessel = 0,
2828
+ PlanetaryStructure = 1
2829
+ }
2830
+ declare function getEntityClass(entityType: Name | EntityTypeName): EntityClass;
2831
+ declare function getPackedEntityType(itemId: number): Name | null;
2832
+ type EntityTypeName = 'ship' | 'warehouse' | 'extractor' | 'container';
2833
+ interface EntityTraits {
2834
+ typeName: Name;
2835
+ isMovable: boolean;
2836
+ hasEnergy: boolean;
2837
+ hasLoaders: boolean;
2838
+ hasModules: boolean;
2839
+ notFoundError: string;
2840
+ }
2841
+ declare const shipTraits: EntityTraits;
2842
+ declare const warehouseTraits: EntityTraits;
2843
+ declare const extractorTraits: EntityTraits;
2844
+ declare const containerTraits: EntityTraits;
2845
+ declare function getEntityTraits(entityType: Name | EntityTypeName): EntityTraits;
2846
+ declare function isShip(entity: {
2847
+ type?: Name;
2848
+ }): boolean;
2849
+ declare function isWarehouse(entity: {
2850
+ type?: Name;
2851
+ }): boolean;
2852
+ declare function isExtractor(entity: {
2853
+ type?: Name;
2854
+ }): boolean;
2855
+ declare function isContainer(entity: {
2856
+ type?: Name;
2857
+ }): boolean;
2858
+
2714
2859
  declare function canMove(e: Entity): e is Entity & MovementCapability & EnergyCapability;
2715
2860
  declare function hasEnergy(e: Entity): e is Entity & EnergyCapability;
2716
2861
  declare function hasStorage(e: Entity): e is Entity & StorageCapability;
@@ -2760,11 +2905,10 @@ declare function isModuleItem(itemId: number): boolean;
2760
2905
  declare function moduleSlotTypeToCode(slotType: string): number;
2761
2906
 
2762
2907
  declare function computeHaulPenalty(totalThrust: number, haulCount: number, avgEfficiency: number): number;
2763
- declare function computeHaulerDrain(distance: number, drain: number, haulCount: number): number;
2908
+ declare function computeHaulerDrain$1(distance: number, drain: number, haulCount: number): number;
2764
2909
 
2765
2910
  declare const categoryColors: Record<ResourceCategory, string>;
2766
2911
  declare const tierColors: Record<number, string>;
2767
- declare const tierLabels: Record<number, string>;
2768
2912
  declare const categoryIcons: Record<ResourceCategory, string>;
2769
2913
  type CategoryIconShape = 'hex' | 'diamond' | 'star' | 'circle' | 'square';
2770
2914
  declare const categoryIconShapes: Record<ResourceCategory, CategoryIconShape>;
@@ -2812,13 +2956,20 @@ interface StatMapping {
2812
2956
  stat: string;
2813
2957
  capability: string;
2814
2958
  attribute: string;
2815
- rationale: string;
2816
2959
  }
2817
2960
  declare const capabilityNames: string[];
2818
2961
  declare const capabilityAttributes: CapabilityAttribute[];
2819
- declare const statMappings: StatMapping[];
2820
2962
  declare function isInvertedAttribute(attribute: string): boolean;
2821
2963
  declare function getCapabilityAttributes(capability?: string): CapabilityAttribute[];
2964
+
2965
+ interface SlotConsumer {
2966
+ capability: string;
2967
+ attribute: string;
2968
+ }
2969
+ type SlotConsumerKind = 'engine' | 'generator' | 'gatherer' | 'loader' | 'crafter' | 'storage' | 'hauler' | 'warp' | 'ship-t1' | 'container-t1' | 'warehouse-t1' | 'extractor-t1' | 'container-t2';
2970
+ declare const SLOT_FORMULAS: Record<SlotConsumerKind, Record<number, SlotConsumer>>;
2971
+
2972
+ declare function deriveStatMappings(): StatMapping[];
2822
2973
  declare function getStatMappings(): StatMapping[];
2823
2974
  declare function getStatMappingsForStat(stat: string): StatMapping[];
2824
2975
  declare function getStatMappingsForCapability(capability: string): StatMapping[];
@@ -2835,7 +2986,14 @@ declare function computeGeneratorCapabilities(stats: Record<string, number>): {
2835
2986
  capacity: number;
2836
2987
  recharge: number;
2837
2988
  };
2838
- declare function computeGathererCapabilities(stats: Record<string, number>): {
2989
+ interface GathererDepthParams {
2990
+ readonly floor: number;
2991
+ readonly slope: number;
2992
+ }
2993
+ declare const GATHERER_DEPTH_TABLE: readonly GathererDepthParams[];
2994
+ declare const GATHERER_DEPTH_MAX_TIER = 10;
2995
+ declare function gathererDepthForTier(tol: number, tier: number): number;
2996
+ declare function computeGathererCapabilities(stats: Record<string, number>, tier: number): {
2839
2997
  yield: number;
2840
2998
  drain: number;
2841
2999
  depth: number;
@@ -2892,10 +3050,7 @@ interface ShipCapabilities {
2892
3050
  drain: number;
2893
3051
  };
2894
3052
  }
2895
- declare function computeShipCapabilities(modules: {
2896
- itemId: number;
2897
- stats: bigint;
2898
- }[]): ShipCapabilities;
3053
+ declare function computeShipCapabilities(modules: InstalledModule[], layout: EntitySlot[]): ShipCapabilities;
2899
3054
 
2900
3055
  interface ResolvedItemStat {
2901
3056
  key: string;
@@ -2996,21 +3151,34 @@ declare function computeBaseCapacityShip(stats: bigint): number;
2996
3151
  declare function computeBaseCapacityWarehouse(stats: bigint): number;
2997
3152
  declare const computeEngineThrust: (vol: number) => number;
2998
3153
  declare const computeEngineDrain: (thm: number) => number;
2999
- declare const computeGeneratorCap: (res: number) => number;
3000
- declare const computeGeneratorRech: (ref: number) => number;
3154
+ declare const computeGeneratorCap: (com: number) => number;
3155
+ declare const computeGeneratorRech: (fin: number) => number;
3001
3156
  declare const computeGathererYield: (str: number) => number;
3002
3157
  declare const computeGathererDrain: (con: number) => number;
3003
- declare const computeGathererDepth: (tol: number) => number;
3158
+ declare const computeGathererDepth: (tol: number, tier: number) => number;
3004
3159
  declare const computeGathererSpeed: (ref: number) => number;
3005
- declare const computeLoaderMass: (fin: number) => number;
3160
+ declare const computeLoaderMass: (ins: number) => number;
3006
3161
  declare const computeLoaderThrust: (pla: number) => number;
3007
3162
  declare const computeCrafterSpeed: (rea: number) => number;
3008
- declare const computeCrafterDrain: (com: number) => number;
3163
+ declare const computeCrafterDrain: (fin: number) => number;
3164
+ declare const computeHaulerCapacity: (fin: number) => number;
3165
+ declare const computeHaulerEfficiency: (con: number) => number;
3166
+ declare const computeHaulerDrain: (com: number) => number;
3167
+ declare const computeWarpRange: (stat: number) => number;
3009
3168
  declare function entityDisplayName(itemId: number): string;
3010
3169
  declare function moduleDisplayName(itemId: number): string;
3011
3170
  declare function formatModuleLine(slot: number, itemId: number, stats: bigint): string;
3012
3171
  declare function buildEntityDescription(itemId: number, hullStats: bigint, moduleItems: number[], moduleStats: bigint[]): string;
3013
3172
 
3173
+ interface SchemaField {
3174
+ name: string;
3175
+ type: string;
3176
+ }
3177
+ type RawData = Uint8Array | string | number[] | {
3178
+ immutable_serialized_data: Uint8Array | string | number[];
3179
+ };
3180
+ declare function deserializeAtomicData(data: RawData, schema: SchemaField[]): Record<string, unknown>;
3181
+
3014
3182
  type index_NFTInstalledModule = NFTInstalledModule;
3015
3183
  type index_NFTModuleSlot = NFTModuleSlot;
3016
3184
  type index_NFTCargoItem = NFTCargoItem;
@@ -3037,10 +3205,17 @@ declare const index_computeLoaderMass: typeof computeLoaderMass;
3037
3205
  declare const index_computeLoaderThrust: typeof computeLoaderThrust;
3038
3206
  declare const index_computeCrafterSpeed: typeof computeCrafterSpeed;
3039
3207
  declare const index_computeCrafterDrain: typeof computeCrafterDrain;
3208
+ declare const index_computeHaulerCapacity: typeof computeHaulerCapacity;
3209
+ declare const index_computeHaulerEfficiency: typeof computeHaulerEfficiency;
3210
+ declare const index_computeHaulerDrain: typeof computeHaulerDrain;
3211
+ declare const index_computeWarpRange: typeof computeWarpRange;
3040
3212
  declare const index_entityDisplayName: typeof entityDisplayName;
3041
3213
  declare const index_moduleDisplayName: typeof moduleDisplayName;
3042
3214
  declare const index_formatModuleLine: typeof formatModuleLine;
3043
3215
  declare const index_buildEntityDescription: typeof buildEntityDescription;
3216
+ type index_SchemaField = SchemaField;
3217
+ type index_RawData = RawData;
3218
+ declare const index_deserializeAtomicData: typeof deserializeAtomicData;
3044
3219
  declare namespace index {
3045
3220
  export {
3046
3221
  index_NFTInstalledModule as NFTInstalledModule,
@@ -3069,10 +3244,17 @@ declare namespace index {
3069
3244
  index_computeLoaderThrust as computeLoaderThrust,
3070
3245
  index_computeCrafterSpeed as computeCrafterSpeed,
3071
3246
  index_computeCrafterDrain as computeCrafterDrain,
3247
+ index_computeHaulerCapacity as computeHaulerCapacity,
3248
+ index_computeHaulerEfficiency as computeHaulerEfficiency,
3249
+ index_computeHaulerDrain as computeHaulerDrain,
3250
+ index_computeWarpRange as computeWarpRange,
3072
3251
  index_entityDisplayName as entityDisplayName,
3073
3252
  index_moduleDisplayName as moduleDisplayName,
3074
3253
  index_formatModuleLine as formatModuleLine,
3075
3254
  index_buildEntityDescription as buildEntityDescription,
3255
+ index_SchemaField as SchemaField,
3256
+ index_RawData as RawData,
3257
+ index_deserializeAtomicData as deserializeAtomicData,
3076
3258
  };
3077
3259
  }
3078
3260
 
@@ -3098,6 +3280,9 @@ interface WebSocketConnectionOptions {
3098
3280
  url: string;
3099
3281
  onMessage: (message: ServerMessage) => void;
3100
3282
  onStateChange?: (state: ConnectionState) => void;
3283
+ minReconnectDelay?: number;
3284
+ pingIntervalMs?: number;
3285
+ pongTimeoutMs?: number;
3101
3286
  }
3102
3287
  declare class WebSocketConnection {
3103
3288
  private ws;
@@ -3109,15 +3294,25 @@ declare class WebSocketConnection {
3109
3294
  private _state;
3110
3295
  private shouldReconnect;
3111
3296
  private sendQueue;
3112
- private static readonly MIN_RECONNECT_DELAY;
3297
+ private minReconnectDelay;
3298
+ private pingIntervalMs;
3299
+ private pongTimeoutMs;
3300
+ private pingTimer;
3301
+ private staleTimer;
3302
+ private static readonly DEFAULT_MIN_RECONNECT_DELAY;
3113
3303
  private static readonly MAX_RECONNECT_DELAY;
3114
3304
  private static readonly RECONNECT_MULTIPLIER;
3305
+ private static readonly DEFAULT_PING_INTERVAL_MS;
3306
+ private static readonly DEFAULT_PONG_TIMEOUT_MS;
3115
3307
  constructor(options: WebSocketConnectionOptions);
3116
3308
  get state(): ConnectionState;
3117
3309
  private setState;
3118
3310
  connect(): void;
3119
3311
  private scheduleReconnect;
3120
3312
  disconnect(): void;
3313
+ private startHeartbeat;
3314
+ private stopHeartbeat;
3315
+ private resetStaleTimer;
3121
3316
  close(): void;
3122
3317
  send(message: ClientMessage): void;
3123
3318
  get isConnected(): boolean;
@@ -3134,12 +3329,9 @@ type energy_stats = Types.energy_stats;
3134
3329
  type loader_stats = Types.loader_stats;
3135
3330
  type task = Types.task;
3136
3331
  type cargo_item = Types.cargo_item;
3137
- type warehouse_row = Types.warehouse_row;
3138
- type container_row = Types.container_row;
3332
+ type entity_row = Types.entity_row;
3139
3333
  type gatherer_stats = Types.gatherer_stats;
3140
3334
  type location_static = Types.location_static;
3141
- type location_epoch = Types.location_epoch;
3142
3335
  type location_derived = Types.location_derived;
3143
- type location_row = Types.location_row;
3144
3336
 
3145
- export { AckMessage, ActionsManager, AnyEntity, BASE_ORBITAL_MASS, BLEND_INPUTS_MUST_MATCH, BLEND_REQUIRES_MULTIPLE, BLEND_STAT_LESS_NOT_SUPPORTED, BoundingBox, BoundsDeltaMessage, BoundsSubscriptionHandle, CANCEL_CONTAINS_GROUPED_TASK, CANCEL_PAIRED_HAS_PENDING, CATEGORY_LABELS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_CAPACITY_EXCEEDED, CONTAINER_NOT_FOUND, CONTAINER_Z, CRAFT_ENERGY_DIVISOR, CRAFT_EXCEEDS_ENERGY_CAPACITY, CRAFT_NOT_ENOUGH_ENERGY, CapabilityAttribute, CapabilityInput, CargoData, CargoMassInfo, CargoStack, CategoryIconShape, CategoryInfo, CategoryStacks, ClientMessage, ConnectionState, Container, ContainerEntity, ContainerStateInput, Coordinates, CoordinatesType, CraftedItemCategory, CrafterCapability, DEPLOY_ENTITY_HAS_SCHEDULE, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, DESTINATION_CAPACITY_EXCEEDED, DerivedStratum, DescribeOptions, Distance, ENTITY_CAPACITY_EXCEEDED, ENTITY_NO_CRAFTER, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EnergyCapability, EntitiesManager, Entity, EntityCapabilities, EntityInfo, EntityInstance, EntityInventory, EntityLayout, EntityRefInput, EntitySlot, EntityState, EntitySubscriptionHandle, EntityType, EntityTypeName, EpochInfo, EpochsManager, ErrorMessage, EstimateTravelTimeOptions, EstimatedTravelTime, EventCatchupCompleteMessage, EventMessage, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GATHER_EXCEEDS_ENERGY_CAPACITY, GATHER_NOT_ENOUGH_ENERGY, GROUP_DUPLICATE_ENTITY, GROUP_EMPTY, GROUP_ENTITY_NOT_MOVABLE, GROUP_HAUL_CAPACITY_EXCEEDED, GROUP_NOT_FOUND, GROUP_NOT_SAME_LOCATION, GROUP_NOT_SAME_OWNER, GROUP_NO_THRUST, GameState, GathererCapability, HasCapacity, HasCargo, HasCargomass, HasScheduleAndLocation, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, ITEM_BIOMASS_T1, ITEM_BIOMASS_T10, ITEM_BIOMASS_T2, ITEM_BIOMASS_T3, ITEM_BIOMASS_T4, ITEM_BIOMASS_T5, ITEM_BIOMASS_T6, ITEM_BIOMASS_T7, ITEM_BIOMASS_T8, ITEM_BIOMASS_T9, ITEM_CARGO_ARM, ITEM_CARGO_LINING, ITEM_CARGO_LINING_T2, ITEM_CONTAINER_T1_PACKED, ITEM_CONTAINER_T2_PACKED, ITEM_CRAFTER_T1, ITEM_CRYSTAL_T1, ITEM_CRYSTAL_T10, ITEM_CRYSTAL_T2, ITEM_CRYSTAL_T3, ITEM_CRYSTAL_T4, ITEM_CRYSTAL_T5, ITEM_CRYSTAL_T6, ITEM_CRYSTAL_T7, ITEM_CRYSTAL_T8, ITEM_CRYSTAL_T9, ITEM_DOES_NOT_EXIST, ITEM_ENGINE_T1, ITEM_FOCUSING_ARRAY, ITEM_GAS_T1, ITEM_GAS_T10, ITEM_GAS_T2, ITEM_GAS_T3, ITEM_GAS_T4, ITEM_GAS_T5, ITEM_GAS_T6, ITEM_GAS_T7, ITEM_GAS_T8, ITEM_GAS_T9, ITEM_GATHERER_T1, ITEM_GENERATOR_T1, ITEM_HAULER_T1, ITEM_HULL_PLATES, ITEM_HULL_PLATES_T2, ITEM_LOADER_T1, ITEM_MATTER_CONDUIT, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_NOT_DEPLOYABLE, ITEM_NOT_PACKED_ENTITY, ITEM_ORE_T1, ITEM_ORE_T10, ITEM_ORE_T2, ITEM_ORE_T3, ITEM_ORE_T4, ITEM_ORE_T5, ITEM_ORE_T6, ITEM_ORE_T7, ITEM_ORE_T8, ITEM_ORE_T9, ITEM_POWER_CELL, ITEM_REACTION_CHAMBER, ITEM_REGOLITH_T1, ITEM_REGOLITH_T10, ITEM_REGOLITH_T2, ITEM_REGOLITH_T3, ITEM_REGOLITH_T4, ITEM_REGOLITH_T5, ITEM_REGOLITH_T6, ITEM_REGOLITH_T7, ITEM_REGOLITH_T8, ITEM_REGOLITH_T9, ITEM_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_SURVEY_PROBE, ITEM_THRUSTER_CORE, ITEM_TOOL_BIT, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, InventoryAccessor, Item, ItemType, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, LoadTimeBreakdown, LoaderCapability, Location, LocationStratum, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, MODULE_ANY, MODULE_CARGO_NOT_FOUND, MODULE_CRAFTER, MODULE_ENGINE, MODULE_ENTITY_BUSY, MODULE_GATHERER, MODULE_GENERATOR, MODULE_HAULER, MODULE_LAUNCHER, MODULE_LOADER, MODULE_NOT_MODULE, MODULE_SLOT_EMPTY, MODULE_SLOT_INVALID, MODULE_SLOT_OCCUPIED, MODULE_STORAGE, MODULE_TYPE_MISMATCH, MODULE_WARP, MassCapability, ModuleDescription, ModuleEntry, ModuleType, MovementCapability, index as NFT, NFTCargoItem, NFTCommonBase, NFTInstalledModule, NFTModuleSlot, NO_SCHEDULE, NamedStats, PLANET_SUBTYPE_GAS_GIANT, PLANET_SUBTYPE_ICY, PLANET_SUBTYPE_INDUSTRIAL, PLANET_SUBTYPE_OCEAN, PLANET_SUBTYPE_ROCKY, PLANET_SUBTYPE_TERRESTRIAL, PLAYER_ALREADY_JOINED, PLAYER_NOT_FOUND, PLAYER_NOT_JOINED, PRECISION, PackedModule, PackedModuleInput, PingMessage, PlanetSubtypeInfo, platform as PlatformContract, Types$1 as PlatformTypes, Player, PlayerStateInput, PlayersManager, PongMessage, Projectable, ProjectableSnapshot, ProjectedEntity, ProjectionOptions, RECIPE_INPUTS_EXCESS, RECIPE_INPUTS_INSUFFICIENT, RECIPE_INPUTS_INVALID, RECIPE_INPUTS_MIXED, RECIPE_NOT_FOUND, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RESERVE_TIERS, RESOLVE_COUNT_EXCEEDS_COMPLETED, Recipe, RecipeInput, RecipeInputCategory, RecipeInputItemId, RecipeSlotInput, RenderDescriptionOptions, ReserveTier, ResolvedAttributeGroup, ResolvedItem, ResolvedItemStat, ResolvedItemType, ResolvedModuleSlot, ResourceCategory, ResourceStats, SHIP_ALREADY_THERE, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_CAPACITY_EXCEEDED, SHIP_CARGO_NOT_LOADED, SHIP_CARGO_NOT_OWNED, SHIP_INVALID_CARGO, SHIP_INVALID_DESTINATION, SHIP_INVALID_TRAVEL_DURATION, SHIP_NOT_ARRIVED, SHIP_NOT_ENOUGH_ENERGY, SHIP_NOT_ENOUGH_ENERGY_CAPACITY, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, STARTER_ALREADY_CLAIMED, ScheduleAccessor, ScheduleCapability, ScheduleData, Scheduleable, server as ServerContract, ServerMessage, Types as ServerTypes, Ship, ShipCapabilities, ShipEntity, ShipLike, ShipStateInput, Shipload, SnapshotMessage, StackInput, StatDefinition, StatMapping, StatSlot, StorageCapability, StratumInfo, SubscribeEntityMessage, SubscribeEventsMessage, SubscribeMessage, SubscriptionEntityType, SubscriptionsManager, SubscriptionsOptions, TIER_ADJECTIVES, TIER_ROLL_MAX, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, TextSpan, TierRange, TransferEntity, UnsubscribeEntityMessage, UnsubscribeEventsMessage, UnsubscribeMessage, UpdateBoundsMessage, UpdateMessage, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WAREHOUSE_Z, WARP_HAS_CARGO, WARP_HAS_SCHEDULE, WARP_NOT_FULL_ENERGY, WARP_NO_CAPABILITY, WARP_OUT_OF_RANGE, Warehouse, WarehouseEntity, WarehouseStateInput, WebSocketConnection, WebSocketConnectionOptions, WireCoordinates, WireEntity, availableCapacity$1 as availableCapacity, availableCapacityFromMass, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildEntityDescription, calcCargoItemMass, calcCargoMass, calcEnergyUsage, calcLoadDuration, calcStacksMass, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_flighttime, calc_gather_duration, calc_gather_energy, calc_loader_acceleration, calc_loader_flighttime, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calculateFlightTime, calculateLoadTimeBreakdown, calculateRefuelingTime, calculateTransferTime, canMove, capabilityAttributes, capabilityNames, capsHasCrafter, capsHasGatherer, capsHasHauler, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoItemToStack, cargoUtils, cargo_item, categoryColors, categoryFromIndex, categoryIconShapes, categoryIcons, categoryLabel, categoryLabelFromIndex, componentIcon, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCraftedOutputStats, computeCrafterCapabilities, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityStats, computeGathererCapabilities, computeGathererDepth, computeGathererDrain, computeGathererSpeed, computeGathererYield, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeHaulPenalty, computeHaulerCapabilities, computeHaulerDrain, computeInputMass, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeShipCapabilities, computeShipHullCapabilities, computeStorageCapabilities, computeWarehouseCapabilities, computeWarehouseHullCapabilities, container_row, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeCraftedItemStats, decodeStat, decodeStats, Shipload as default, deriveLocation, deriveLocationEpoch, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStrata, deriveStratum, describeItem, describeModule, describeModuleForItem, describeModuleForSlot, deserializeAsset, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, displayName, distanceBetweenCoordinates, distanceBetweenPoints, encodeGatheredCargoStats, encodeStats, energyPercent, energy_stats, entityDisplayName, estimateDealTravelTime, estimateTravelTime, findItemByCategoryAndTier, findNearbyPlanets, formatMass, formatMassDelta, formatModuleLine, formatTier, gatherer_stats, getCapabilityAttributes, getCategoryInfo, getComponents, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEligibleResources, getEntityItems, getEntityLayout, getEpochInfo, getFlightOrigin, getItem, getItems, getLocationCandidates, getLocationType, getLocationTypeName, getModuleCapabilityType, getModules, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getRecipe, getResourceTier, getResourceWeight, getResources, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, hasEnergy, hasEnergyForDistance, hasGatherer, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, isCraftedItem, isFull$1 as isFull, isFullFromMass, isGatherableLocation, isInvertedAttribute, isModuleItem, isRelatedItem, isSubscriptionsDebugEnabled, itemAbbreviations, itemCategory, itemIds, itemOffset, itemTier, itemTypeCode, lerp, loader_stats, location_derived, location_epoch, location_row, location_static, makeContainer, makeShip, makeWarehouse, mapEntity, maxTravelDistance, mergeStacks, moduleAccepts, moduleDisplayName, moduleIcon, moduleSlotTypeToCode, movement_stats, needsRecharge, parseWireEntity, projectEntity, projectEntityAt, projectFromCurrentState, projectFromCurrentStateAt, readCommonBase, removeFromStacks, renderDescription, resolveItem, resolveItemCategory, resolveStats, rollTier, rollWithinTier, rotation, schedule, setSubscriptionsDebug, stackKey, stackToCargoItem, stacksEqual, statMappings, task, tierColors, tierLabel, tierLabels, toLocation, typeLabel, validateSchedule, warehouse_row };
3337
+ export { AckMessage, ActionsManager, AnyEntity, BASE_ORBITAL_MASS, BLEND_INPUTS_MUST_MATCH, BLEND_REQUIRES_MULTIPLE, BLEND_STAT_LESS_NOT_SUPPORTED, BoundingBox, BoundsDeltaMessage, BoundsSubscriptionHandle, CANCEL_CONTAINS_GROUPED_TASK, CANCEL_PAIRED_HAS_PENDING, CATEGORY_LABELS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_CAPACITY_EXCEEDED, CONTAINER_NOT_FOUND, CONTAINER_Z, CRAFT_ENERGY_DIVISOR, CRAFT_EXCEEDS_ENERGY_CAPACITY, CRAFT_NOT_ENOUGH_ENERGY, CapabilityAttribute, CapabilityInput, CargoData, CargoMassInfo, CargoStack, CategoryIconShape, CategoryInfo, CategoryStacks, ClientMessage, ConnectionState, Container, ContainerEntity, ContainerStateInput, Coordinates, CoordinatesType, CraftedItemCategory, CrafterCapability, DEPLOY_ENTITY_HAS_SCHEDULE, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, DESTINATION_CAPACITY_EXCEEDED, DerivedStratum, DescribeOptions, Distance, ENTITY_CAPACITY_EXCEEDED, ENTITY_CONTAINER, ENTITY_EXTRACTOR, ENTITY_NO_CRAFTER, ENTITY_SHIP, ENTITY_WAREHOUSE, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EnergyCapability, EntitiesManager, Entity, EntityCapabilities, EntityClass, EntityInfo, EntityInstance, EntityInventory, EntityLayout, EntityRefInput, EntitySlot, EntityState, EntitySubscriptionHandle, EntityTraits, EntityType, EntityTypeName, EpochInfo, EpochsManager, ErrorMessage, EstimateTravelTimeOptions, EstimatedTravelTime, EventCatchupCompleteMessage, EventMessage, Extractor, ExtractorCapabilities, ExtractorStateInput, FloatPosition, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GATHERER_DEPTH_MAX_TIER, GATHERER_DEPTH_TABLE, GATHER_EXCEEDS_ENERGY_CAPACITY, GATHER_NOT_ENOUGH_ENERGY, GROUP_DUPLICATE_ENTITY, GROUP_EMPTY, GROUP_ENTITY_NOT_MOVABLE, GROUP_HAUL_CAPACITY_EXCEEDED, GROUP_NOT_FOUND, GROUP_NOT_SAME_LOCATION, GROUP_NOT_SAME_OWNER, GROUP_NO_THRUST, GameState, GathererCapability, GathererDepthParams, HasCapacity, HasCargo, HasCargomass, HasScheduleAndLocation, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, ITEM_BIOMASS_T1, ITEM_BIOMASS_T10, ITEM_BIOMASS_T2, ITEM_BIOMASS_T3, ITEM_BIOMASS_T4, ITEM_BIOMASS_T5, ITEM_BIOMASS_T6, ITEM_BIOMASS_T7, ITEM_BIOMASS_T8, ITEM_BIOMASS_T9, ITEM_CARGO_ARM, ITEM_CARGO_LINING, ITEM_CARGO_LINING_T2, ITEM_CONTAINER_T1_PACKED, ITEM_CONTAINER_T2_PACKED, ITEM_CRAFTER_T1, ITEM_CRYSTAL_T1, ITEM_CRYSTAL_T10, ITEM_CRYSTAL_T2, ITEM_CRYSTAL_T3, ITEM_CRYSTAL_T4, ITEM_CRYSTAL_T5, ITEM_CRYSTAL_T6, ITEM_CRYSTAL_T7, ITEM_CRYSTAL_T8, ITEM_CRYSTAL_T9, ITEM_DOES_NOT_EXIST, ITEM_ENGINE_T1, ITEM_EXTRACTOR_T1_PACKED, ITEM_FOCUSING_ARRAY, ITEM_GAS_T1, ITEM_GAS_T10, ITEM_GAS_T2, ITEM_GAS_T3, ITEM_GAS_T4, ITEM_GAS_T5, ITEM_GAS_T6, ITEM_GAS_T7, ITEM_GAS_T8, ITEM_GAS_T9, ITEM_GATHERER_T1, ITEM_GENERATOR_T1, ITEM_HAULER_T1, ITEM_HULL_PLATES, ITEM_HULL_PLATES_T2, ITEM_LOADER_T1, ITEM_MATTER_CONDUIT, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_NOT_DEPLOYABLE, ITEM_NOT_PACKED_ENTITY, ITEM_ORE_T1, ITEM_ORE_T10, ITEM_ORE_T2, ITEM_ORE_T3, ITEM_ORE_T4, ITEM_ORE_T5, ITEM_ORE_T6, ITEM_ORE_T7, ITEM_ORE_T8, ITEM_ORE_T9, ITEM_POWER_CELL, ITEM_REACTION_CHAMBER, ITEM_REGOLITH_T1, ITEM_REGOLITH_T10, ITEM_REGOLITH_T2, ITEM_REGOLITH_T3, ITEM_REGOLITH_T4, ITEM_REGOLITH_T5, ITEM_REGOLITH_T6, ITEM_REGOLITH_T7, ITEM_REGOLITH_T8, ITEM_REGOLITH_T9, ITEM_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_SURVEY_PROBE, ITEM_THRUSTER_CORE, ITEM_TOOL_BIT, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, ITEM_WARP_T1, InventoryAccessor, Item, ItemType, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, LoadTimeBreakdown, LoaderCapability, Location, LocationStratum, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, MIN_TRANSFER_DISTANCE, MODULE_ANY, MODULE_CARGO_NOT_FOUND, MODULE_CRAFTER, MODULE_ENGINE, MODULE_ENTITY_BUSY, MODULE_GATHERER, MODULE_GENERATOR, MODULE_HAULER, MODULE_LAUNCHER, MODULE_LOADER, MODULE_NOT_MODULE, MODULE_SLOT_EMPTY, MODULE_SLOT_INVALID, MODULE_SLOT_OCCUPIED, MODULE_STORAGE, MODULE_TYPE_MISMATCH, MODULE_WARP, MassCapability, ModuleDescription, ModuleEntry, ModuleType, MovementCapability, index as NFT, NFTCargoItem, NFTCommonBase, NFTInstalledModule, NFTModuleSlot, NO_SCHEDULE, NamedStats, OwnerSubscriptionHandle, PLANETARY_STRUCTURE_Z, PLANET_SUBTYPE_GAS_GIANT, PLANET_SUBTYPE_ICY, PLANET_SUBTYPE_INDUSTRIAL, PLANET_SUBTYPE_OCEAN, PLANET_SUBTYPE_ROCKY, PLANET_SUBTYPE_TERRESTRIAL, PLAYER_ALREADY_JOINED, PLAYER_NOT_FOUND, PLAYER_NOT_JOINED, PRECISION, PackedModule, PackedModuleInput, PingMessage, PlanetSubtypeInfo, platform as PlatformContract, Types$1 as PlatformTypes, Player, PlayerStateInput, PlayersManager, PongMessage, Projectable, ProjectableSnapshot, ProjectedEntity, ProjectionOptions, RECIPE_INPUTS_EXCESS, RECIPE_INPUTS_INSUFFICIENT, RECIPE_INPUTS_INVALID, RECIPE_INPUTS_MIXED, RECIPE_NOT_FOUND, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RESERVE_TIERS, RESOLVE_COUNT_EXCEEDS_COMPLETED, RawData, Recipe, RecipeInput, RecipeInputCategory, RecipeInputItemId, RecipeSlotInput, RenderDescriptionOptions, ReserveTier, ResolvedAttributeGroup, ResolvedItem, ResolvedItemStat, ResolvedItemType, ResolvedModuleSlot, ResourceCategory, ResourceStats, SHIP_ALREADY_THERE, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_CAPACITY_EXCEEDED, SHIP_CARGO_NOT_LOADED, SHIP_CARGO_NOT_OWNED, SHIP_INVALID_CARGO, SHIP_INVALID_DESTINATION, SHIP_INVALID_TRAVEL_DURATION, SHIP_NOT_ARRIVED, SHIP_NOT_ENOUGH_ENERGY, SHIP_NOT_ENOUGH_ENERGY_CAPACITY, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, SLOT_FORMULAS, STARTER_ALREADY_CLAIMED, ScheduleAccessor, ScheduleCapability, ScheduleData, Scheduleable, SchemaField, server as ServerContract, ServerMessage, Types as ServerTypes, Ship, ShipCapabilities, ShipEntity, ShipLike, ShipStateInput, Shipload, SlotConsumer, SlotConsumerKind, SnapshotMessage, StackInput, StatDefinition, StatMapping, StatSlot, StorageCapability, StratumInfo, SubscribeEntityMessage, SubscribeEventsMessage, SubscribeMessage, SubscriptionEntityType, SubscriptionsManager, SubscriptionsOptions, TIER_ADJECTIVES, TIER_ROLL_MAX, TRAVEL_MAX_DURATION, TaskCancelable, TaskCargoChange, TaskCargoDirection, TaskType, TextSpan, TierRange, TransferEntity, UnsubscribeEntityMessage, UnsubscribeEventsMessage, UnsubscribeMessage, UpdateBoundsMessage, UpdateMessage, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WARP_HAS_CARGO, WARP_HAS_SCHEDULE, WARP_NOT_FULL_ENERGY, WARP_NO_CAPABILITY, WARP_OUT_OF_RANGE, Warehouse, WarehouseEntity, WarehouseStateInput, WebSocketConnection, WebSocketConnectionOptions, WireCoordinates, WireEntity, availableCapacity$1 as availableCapacity, availableCapacityFromMass, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildEntityDescription, calcCargoItemMass, calcCargoMass, calcEnergyUsage, calcLoadDuration, calcStacksMass, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_flighttime, calc_gather_duration, calc_gather_energy, calc_loader_acceleration, calc_loader_flighttime, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calculateFlightTime, calculateLoadTimeBreakdown, calculateRefuelingTime, calculateTransferTime, canMove, capabilityAttributes, capabilityNames, capsHasCrafter, capsHasGatherer, capsHasHauler, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoItem, cargoItemToStack, cargoRef, cargoUtils, cargo_item, categoryColors, categoryFromIndex, categoryIconShapes, categoryIcons, categoryLabel, categoryLabelFromIndex, componentIcon, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCraftedOutputStats, computeCrafterCapabilities, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityStats, computeExtractorCapabilities, computeGathererCapabilities, computeGathererDepth, computeGathererDrain, computeGathererSpeed, computeGathererYield, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeHaulPenalty, computeHaulerCapabilities, computeHaulerCapacity, computeHaulerDrain$1 as computeHaulerDrain, computeHaulerEfficiency, computeInputMass, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeShipCapabilities, computeShipHullCapabilities, computeStorageCapabilities, computeWarehouseCapabilities, computeWarehouseHullCapabilities, computeWarpRange, containerTraits, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeCraftedItemStats, decodeStat, decodeStats, Shipload as default, deriveLocation, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStatMappings, deriveStrata, deriveStratum, describeItem, describeModule, describeModuleForItem, describeModuleForSlot, deserializeAsset, deserializeAtomicData, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, displayName, distanceBetweenCoordinates, distanceBetweenPoints, easeFlightProgress, encodeGatheredCargoStats, encodeStats, energyPercent, energy_stats, entityDisplayName, entity_row, estimateDealTravelTime, estimateTravelTime, extractorTraits, findItemByCategoryAndTier, findNearbyPlanets, flightSpeedFactor, formatMass, formatMassDelta, formatModuleLine, formatTier, gathererDepthForTier, gatherer_stats, getCapabilityAttributes, getCategoryInfo, getComponents, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEligibleResources, getEntityClass, getEntityItems, getEntityLayout, getEntityTraits, getEpochInfo, getFlightOrigin, getInterpolatedPosition, getItem, getItems, getLocationCandidates, getLocationProfile, getLocationType, getLocationTypeName, getModuleCapabilityType, getModules, getPackedEntityType, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getRecipe, getResourceTier, getResourceWeight, getResources, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, hasEnergy, hasEnergyForDistance, hasGatherer, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, interpolateFlightPosition, isContainer, isCraftedItem, isExtractor, isFull$1 as isFull, isFullFromMass, isGatherableLocation, isInvertedAttribute, isLocationBuildable, isModuleItem, isRelatedItem, isShip, isSubscriptionsDebugEnabled, isWarehouse, itemAbbreviations, itemCategory, itemIds, itemOffset, itemTier, itemTypeCode, lerp, loader_stats, location_derived, location_static, makeContainer, makeExtractor, makeShip, makeWarehouse, mapEntity, maxTravelDistance, mergeStacks, moduleAccepts, moduleDisplayName, moduleIcon, moduleSlotTypeToCode, movement_stats, needsRecharge, parseWireEntity, projectEntity, projectEntityAt, projectFromCurrentState, projectFromCurrentStateAt, readCommonBase, removeFromStacks, renderDescription, resolveItem, resolveItemCategory, resolveStats, rollTier, rollWithinTier, rotation, schedule, setSubscriptionsDebug, shipTraits, stackKey, stackToCargoItem, stacksEqual, task, taskCargoChanges, tierAdjective, tierColors, toLocation, typeLabel, validateSchedule, warehouseTraits };