@shipload/sdk 1.0.0-next.43 → 1.0.0-next.44

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 (39) hide show
  1. package/lib/shipload.d.ts +141 -172
  2. package/lib/shipload.js +503 -300
  3. package/lib/shipload.js.map +1 -1
  4. package/lib/shipload.m.js +500 -302
  5. package/lib/shipload.m.js.map +1 -1
  6. package/lib/testing.d.ts +50 -67
  7. package/lib/testing.js +168 -208
  8. package/lib/testing.js.map +1 -1
  9. package/lib/testing.m.js +169 -209
  10. package/lib/testing.m.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/contracts/server.ts +126 -214
  13. package/src/data/capabilities.ts +14 -14
  14. package/src/data/capability-formulas.ts +7 -7
  15. package/src/data/entities.json +4 -0
  16. package/src/data/item-ids.ts +1 -0
  17. package/src/data/items.json +6 -0
  18. package/src/data/kind-registry.json +18 -6
  19. package/src/data/kind-registry.ts +7 -0
  20. package/src/data/metadata.ts +22 -15
  21. package/src/data/recipes.json +170 -19
  22. package/src/derivation/build-methods.test.ts +13 -0
  23. package/src/derivation/build-methods.ts +5 -2
  24. package/src/derivation/capabilities.ts +8 -8
  25. package/src/index-module.ts +5 -0
  26. package/src/managers/actions.ts +25 -8
  27. package/src/managers/cluster.test.ts +39 -0
  28. package/src/managers/cluster.ts +53 -0
  29. package/src/managers/context.ts +9 -0
  30. package/src/managers/index.ts +2 -0
  31. package/src/nft/buildImmutableData.ts +15 -17
  32. package/src/nft/description.ts +8 -8
  33. package/src/resolution/describe-module.ts +6 -6
  34. package/src/resolution/resolve-item.ts +3 -3
  35. package/src/shipload.ts +5 -0
  36. package/src/subscriptions/manager.cluster.test.ts +46 -0
  37. package/src/subscriptions/manager.ts +22 -0
  38. package/src/subscriptions/types.ts +16 -0
  39. package/src/types.ts +7 -0
package/lib/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Struct, UInt16, UInt64, UInt8, Int64, Name, UInt32, TimePoint, Checksum256, BlockTimestamp, Bytes, Int32, Int64Type } from '@wharfkit/antelope';
1
+ import { Struct, UInt16, UInt64, UInt8, Int64, Name, UInt32, TimePoint, Int8, Checksum256, Bytes, Int32, BlockTimestamp, Int64Type } from '@wharfkit/antelope';
2
2
 
3
3
  declare const CATALOG_FILES_REL: readonly ["items.json", "recipes.json", "entities.json", "kind-registry.json", "item-ids.ts"];
4
4
  declare function computeCatalogHash(filePaths: ReadonlyArray<string>): string;
@@ -81,30 +81,28 @@ declare namespace Types {
81
81
  id: UInt64;
82
82
  entity_id?: UInt64;
83
83
  }
84
- class claim_row extends Struct {
85
- owner: Name;
86
- }
87
- class coordinates extends Struct {
88
- x: Int64;
89
- y: Int64;
90
- z?: UInt16;
84
+ class cluster_slot extends Struct {
85
+ hub: UInt64;
86
+ gx: Int8;
87
+ gy: Int8;
91
88
  }
92
89
  class claimplot extends Struct {
93
90
  builder_id: UInt64;
94
91
  target_item_id: UInt16;
95
- coords: coordinates;
96
- }
97
- class claimstarter extends Struct {
98
- owner: Name;
92
+ slot: cluster_slot;
99
93
  }
100
94
  class cleanrsvp extends Struct {
101
95
  epoch: UInt64;
102
96
  max_rows: UInt64;
103
97
  }
104
- class cleartable extends Struct {
105
- table_name: Name;
106
- scope?: Name;
107
- max_rows?: UInt64;
98
+ class cluster_cell extends Struct {
99
+ gx: Int8;
100
+ gy: Int8;
101
+ entity: UInt64;
102
+ }
103
+ class cluster_row extends Struct {
104
+ root: UInt64;
105
+ cells: cluster_cell[];
108
106
  }
109
107
  class commit extends Struct {
110
108
  oracle_id: Name;
@@ -136,6 +134,11 @@ declare namespace Types {
136
134
  class configlog extends Struct {
137
135
  config: game_config;
138
136
  }
137
+ class coordinates extends Struct {
138
+ x: Int64;
139
+ y: Int64;
140
+ z?: UInt16;
141
+ }
139
142
  class craft extends Struct {
140
143
  id: UInt64;
141
144
  recipe_id: UInt16;
@@ -156,6 +159,7 @@ declare namespace Types {
156
159
  class deploy extends Struct {
157
160
  id: UInt64;
158
161
  ref: cargo_ref;
162
+ slot?: cluster_slot;
159
163
  }
160
164
  class descentity extends Struct {
161
165
  item_id: UInt16;
@@ -315,11 +319,12 @@ declare namespace Types {
315
319
  threshold: UInt8;
316
320
  seed: Checksum256;
317
321
  }
318
- class fixcargomass extends Struct {
319
- entity_id: UInt64;
322
+ class grid_cell extends Struct {
323
+ gx: Int8;
324
+ gy: Int8;
320
325
  }
321
- class forcereveal extends Struct {
322
- epoch: UInt64;
326
+ class footprint_result extends Struct {
327
+ cells: grid_cell[];
323
328
  }
324
329
  class gather extends Struct {
325
330
  source_id: UInt64;
@@ -331,11 +336,10 @@ declare namespace Types {
331
336
  class genesisfleet extends Struct {
332
337
  entities: entity_row[];
333
338
  }
334
- class getconfig extends Struct {
339
+ class getcluster extends Struct {
340
+ hub_id: UInt64;
335
341
  }
336
- class getdeposit extends Struct {
337
- owner: Name;
338
- asset_id: UInt64;
342
+ class getconfig extends Struct {
339
343
  }
340
344
  class getdistance extends Struct {
341
345
  ax: Int64;
@@ -356,15 +360,15 @@ declare namespace Types {
356
360
  class getentity extends Struct {
357
361
  entity_id: UInt64;
358
362
  }
363
+ class getfootprint extends Struct {
364
+ item_id: UInt16;
365
+ }
359
366
  class getitemdata extends Struct {
360
367
  }
361
368
  class getitemids extends Struct {
362
369
  }
363
370
  class getitems extends Struct {
364
371
  }
365
- class getitemtype extends Struct {
366
- item_id: UInt16;
367
- }
368
372
  class getitemtypes extends Struct {
369
373
  }
370
374
  class getkindmeta extends Struct {
@@ -385,8 +389,6 @@ declare namespace Types {
385
389
  entity_id: UInt64;
386
390
  recharge: boolean;
387
391
  }
388
- class getnftbase extends Struct {
389
- }
390
392
  class getnftinfo extends Struct {
391
393
  }
392
394
  class getplayer extends Struct {
@@ -445,37 +447,6 @@ declare namespace Types {
445
447
  class hash512 extends Struct {
446
448
  value: string;
447
449
  }
448
- class importcargo extends Struct {
449
- row: cargo_row;
450
- }
451
- class importentity extends Struct {
452
- row: entity_row;
453
- }
454
- class importgroup extends Struct {
455
- row: entitygroup_row;
456
- }
457
- class importplayer extends Struct {
458
- owner: Name;
459
- }
460
- class reserve_row extends Struct {
461
- id: UInt64;
462
- coord_id: UInt64;
463
- stratum: UInt16;
464
- remaining: UInt32;
465
- last_block: BlockTimestamp;
466
- }
467
- class importreserve extends Struct {
468
- epoch_scope: UInt32;
469
- row: reserve_row;
470
- }
471
- class state_row extends Struct {
472
- enabled: boolean;
473
- epoch: UInt32;
474
- seed: Checksum256;
475
- }
476
- class importstate extends Struct {
477
- row: state_row;
478
- }
479
450
  class item_id_pair extends Struct {
480
451
  id: UInt16;
481
452
  name: string;
@@ -571,6 +542,13 @@ declare namespace Types {
571
542
  class modules_result extends Struct {
572
543
  modules: module_info[];
573
544
  }
545
+ class movetile extends Struct {
546
+ hub_id: UInt64;
547
+ from_gx: Int8;
548
+ from_gy: Int8;
549
+ to_gx: Int8;
550
+ to_gy: Int8;
551
+ }
574
552
  class nearby_system extends Struct {
575
553
  distance: UInt64;
576
554
  energy_cost: UInt64;
@@ -689,6 +667,13 @@ declare namespace Types {
689
667
  id: UInt64;
690
668
  name: string;
691
669
  }
670
+ class reserve_row extends Struct {
671
+ id: UInt64;
672
+ coord_id: UInt64;
673
+ stratum: UInt16;
674
+ remaining: UInt32;
675
+ last_block: BlockTimestamp;
676
+ }
692
677
  class resolve extends Struct {
693
678
  id: UInt64;
694
679
  count?: UInt64;
@@ -741,11 +726,6 @@ declare namespace Types {
741
726
  class rmnftcfg extends Struct {
742
727
  item_id: UInt16;
743
728
  }
744
- class setcoords extends Struct {
745
- entity_id: UInt64;
746
- x: Int64;
747
- y: Int64;
748
- }
749
729
  class setnftcfg extends Struct {
750
730
  item_id: UInt16;
751
731
  template_id: Int32;
@@ -763,6 +743,11 @@ declare namespace Types {
763
743
  fee_pct: UInt16;
764
744
  fee_account: Name;
765
745
  }
746
+ class state_row extends Struct {
747
+ enabled: boolean;
748
+ epoch: UInt32;
749
+ seed: Checksum256;
750
+ }
766
751
  class stowcargo extends Struct {
767
752
  owner: Name;
768
753
  entity_id: UInt64;
@@ -833,8 +818,6 @@ declare namespace Types {
833
818
  x: Int64;
834
819
  y: Int64;
835
820
  }
836
- class wipe extends Struct {
837
- }
838
821
  class wormhole_info extends Struct {
839
822
  coords: coordinates;
840
823
  is_wormhole: boolean;