@shipload/sdk 1.0.0-next.45 → 1.0.0-next.46

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 (41) hide show
  1. package/lib/shipload.d.ts +235 -39
  2. package/lib/shipload.js +1399 -157
  3. package/lib/shipload.js.map +1 -1
  4. package/lib/shipload.m.js +1385 -158
  5. package/lib/shipload.m.js.map +1 -1
  6. package/lib/testing.d.ts +81 -15
  7. package/lib/testing.js +374 -41
  8. package/lib/testing.js.map +1 -1
  9. package/lib/testing.m.js +375 -42
  10. package/lib/testing.m.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/capabilities/gathering.test.ts +14 -1
  13. package/src/capabilities/gathering.ts +6 -5
  14. package/src/capabilities/modules.ts +4 -0
  15. package/src/contracts/server.ts +242 -28
  16. package/src/data/entities.json +93 -19
  17. package/src/data/item-ids.ts +12 -0
  18. package/src/data/items.json +76 -2
  19. package/src/data/kind-registry.json +10 -0
  20. package/src/data/metadata.ts +68 -0
  21. package/src/data/recipes-runtime.ts +1 -0
  22. package/src/data/recipes.json +720 -0
  23. package/src/derivation/capabilities.test.ts +11 -11
  24. package/src/derivation/capabilities.ts +42 -27
  25. package/src/derivation/index.ts +2 -0
  26. package/src/derivation/recipe-usage.test.ts +11 -7
  27. package/src/derivation/stars.test.ts +16 -0
  28. package/src/derivation/stars.ts +10 -0
  29. package/src/derivation/stratum.ts +11 -4
  30. package/src/entities/makers.ts +8 -1
  31. package/src/index-module.ts +5 -1
  32. package/src/managers/actions.ts +10 -0
  33. package/src/nft/buildImmutableData.ts +1 -1
  34. package/src/nft/description.ts +20 -11
  35. package/src/resolution/describe-module.ts +21 -8
  36. package/src/resolution/resolve-item.ts +31 -33
  37. package/src/scheduling/projection.ts +8 -1
  38. package/src/subscriptions/manager.cluster.test.ts +7 -2
  39. package/src/subscriptions/types.ts +1 -0
  40. package/src/utils/cargo.test.ts +14 -0
  41. package/src/utils/cargo.ts +2 -0
package/lib/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Struct, UInt16, UInt64, UInt8, Int64, Name, UInt32, TimePoint, Int8, Checksum256, Bytes, Int32, BlockTimestamp, Int64Type } from '@wharfkit/antelope';
1
+ import { Struct, UInt16, UInt64, UInt8, Int64, Name, UInt32, TimePoint, Int8, Checksum256, BlockTimestamp, Bytes, Int32, 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,6 +81,9 @@ declare namespace Types {
81
81
  id: UInt64;
82
82
  entity_id?: UInt64;
83
83
  }
84
+ class claim_row extends Struct {
85
+ owner: Name;
86
+ }
84
87
  class cluster_slot extends Struct {
85
88
  hub: UInt64;
86
89
  gx: Int8;
@@ -91,10 +94,18 @@ declare namespace Types {
91
94
  target_item_id: UInt16;
92
95
  slot: cluster_slot;
93
96
  }
97
+ class claimstarter extends Struct {
98
+ owner: Name;
99
+ }
94
100
  class cleanrsvp extends Struct {
95
101
  epoch: UInt64;
96
102
  max_rows: UInt64;
97
103
  }
104
+ class cleartable extends Struct {
105
+ table_name: Name;
106
+ scope?: Name;
107
+ max_rows?: UInt64;
108
+ }
98
109
  class cluster_cell extends Struct {
99
110
  gx: Int8;
100
111
  gy: Int8;
@@ -185,10 +196,15 @@ declare namespace Types {
185
196
  class warp_stats extends Struct {
186
197
  range: UInt32;
187
198
  }
199
+ class hauler_tier_cap extends Struct {
200
+ tier: UInt8;
201
+ capacity: UInt8;
202
+ }
188
203
  class hauler_stats extends Struct {
189
204
  capacity: UInt8;
190
205
  efficiency: UInt16;
191
206
  drain: UInt32;
207
+ capacity_by_tier: hauler_tier_cap[];
192
208
  }
193
209
  class gatherer_lane extends Struct {
194
210
  slot_index: UInt8;
@@ -261,6 +277,7 @@ declare namespace Types {
261
277
  class slot_def extends Struct {
262
278
  type: UInt8;
263
279
  output_pct: UInt16;
280
+ max_tier: UInt8;
264
281
  }
265
282
  class entity_layout extends Struct {
266
283
  entity_item_id: UInt16;
@@ -319,6 +336,9 @@ declare namespace Types {
319
336
  threshold: UInt8;
320
337
  seed: Checksum256;
321
338
  }
339
+ class fixcargomass extends Struct {
340
+ entity_id: UInt64;
341
+ }
322
342
  class grid_cell extends Struct {
323
343
  gx: Int8;
324
344
  gy: Int8;
@@ -326,6 +346,9 @@ declare namespace Types {
326
346
  class footprint_result extends Struct {
327
347
  cells: grid_cell[];
328
348
  }
349
+ class forcereveal extends Struct {
350
+ epoch: UInt64;
351
+ }
329
352
  class gather extends Struct {
330
353
  source_id: UInt64;
331
354
  destination_id: UInt64;
@@ -341,6 +364,10 @@ declare namespace Types {
341
364
  }
342
365
  class getconfig extends Struct {
343
366
  }
367
+ class getdeposit extends Struct {
368
+ owner: Name;
369
+ asset_id: UInt64;
370
+ }
344
371
  class getdistance extends Struct {
345
372
  ax: Int64;
346
373
  ay: Int64;
@@ -369,6 +396,9 @@ declare namespace Types {
369
396
  }
370
397
  class getitems extends Struct {
371
398
  }
399
+ class getitemtype extends Struct {
400
+ item_id: UInt16;
401
+ }
372
402
  class getitemtypes extends Struct {
373
403
  }
374
404
  class getkindmeta extends Struct {
@@ -389,6 +419,8 @@ declare namespace Types {
389
419
  entity_id: UInt64;
390
420
  recharge: boolean;
391
421
  }
422
+ class getnftbase extends Struct {
423
+ }
392
424
  class getnftinfo extends Struct {
393
425
  }
394
426
  class getplayer extends Struct {
@@ -447,6 +479,37 @@ declare namespace Types {
447
479
  class hash512 extends Struct {
448
480
  value: string;
449
481
  }
482
+ class importcargo extends Struct {
483
+ row: cargo_row;
484
+ }
485
+ class importentity extends Struct {
486
+ row: entity_row;
487
+ }
488
+ class importgroup extends Struct {
489
+ row: entitygroup_row;
490
+ }
491
+ class importplayer extends Struct {
492
+ owner: Name;
493
+ }
494
+ class reserve_row extends Struct {
495
+ id: UInt64;
496
+ coord_id: UInt64;
497
+ stratum: UInt16;
498
+ remaining: UInt32;
499
+ last_block: BlockTimestamp;
500
+ }
501
+ class importreserve extends Struct {
502
+ epoch_scope: UInt32;
503
+ row: reserve_row;
504
+ }
505
+ class state_row extends Struct {
506
+ enabled: boolean;
507
+ epoch: UInt32;
508
+ seed: Checksum256;
509
+ }
510
+ class importstate extends Struct {
511
+ row: state_row;
512
+ }
450
513
  class item_id_pair extends Struct {
451
514
  id: UInt16;
452
515
  name: string;
@@ -603,7 +666,7 @@ declare namespace Types {
603
666
  owner: Name;
604
667
  entity_type: Name;
605
668
  entity_id: UInt64;
606
- task_index: UInt8;
669
+ task_index: UInt32;
607
670
  task: task;
608
671
  starts_at: TimePoint;
609
672
  completes_at: TimePoint;
@@ -653,6 +716,7 @@ declare namespace Types {
653
716
  crafter_lanes: crafter_lane[];
654
717
  loader_lanes: loader_lane[];
655
718
  launcher?: launcher_stats;
719
+ tier: UInt8;
656
720
  }
657
721
  class recharge extends Struct {
658
722
  id: UInt64;
@@ -667,13 +731,6 @@ declare namespace Types {
667
731
  id: UInt64;
668
732
  name: string;
669
733
  }
670
- class reserve_row extends Struct {
671
- id: UInt64;
672
- coord_id: UInt64;
673
- stratum: UInt16;
674
- remaining: UInt32;
675
- last_block: BlockTimestamp;
676
- }
677
734
  class resolve extends Struct {
678
735
  id: UInt64;
679
736
  count?: UInt64;
@@ -681,7 +738,7 @@ declare namespace Types {
681
738
  class resolve_results extends Struct {
682
739
  entity_id: UInt64;
683
740
  entity_type: Name;
684
- resolved_count: UInt8;
741
+ resolved_count: UInt32;
685
742
  new_schedule_started?: TimePoint;
686
743
  entitygroup?: UInt64;
687
744
  group_members?: entity_ref[];
@@ -726,6 +783,11 @@ declare namespace Types {
726
783
  class rmnftcfg extends Struct {
727
784
  item_id: UInt16;
728
785
  }
786
+ class setcoords extends Struct {
787
+ entity_id: UInt64;
788
+ x: Int64;
789
+ y: Int64;
790
+ }
729
791
  class setnftcfg extends Struct {
730
792
  item_id: UInt16;
731
793
  template_id: Int32;
@@ -743,11 +805,6 @@ declare namespace Types {
743
805
  fee_pct: UInt16;
744
806
  fee_account: Name;
745
807
  }
746
- class state_row extends Struct {
747
- enabled: boolean;
748
- epoch: UInt32;
749
- seed: Checksum256;
750
- }
751
808
  class stowcargo extends Struct {
752
809
  owner: Name;
753
810
  entity_id: UInt64;
@@ -781,6 +838,13 @@ declare namespace Types {
781
838
  module_index: UInt8;
782
839
  module_ref: cargo_ref;
783
840
  }
841
+ class swaptile extends Struct {
842
+ hub_id: UInt64;
843
+ a_gx: Int8;
844
+ a_gy: Int8;
845
+ b_gx: Int8;
846
+ b_gy: Int8;
847
+ }
784
848
  class task_results extends Struct {
785
849
  entities: entity_task_info[];
786
850
  }
@@ -818,6 +882,8 @@ declare namespace Types {
818
882
  x: Int64;
819
883
  y: Int64;
820
884
  }
885
+ class wipe extends Struct {
886
+ }
821
887
  class wormhole_info extends Struct {
822
888
  coords: coordinates;
823
889
  is_wormhole: boolean;