@shipload/sdk 1.0.0-next.15 → 1.0.0-next.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/shipload.d.ts +180 -79
- package/lib/shipload.js +155 -124
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +155 -124
- package/lib/shipload.m.js.map +1 -1
- package/lib/testing.d.ts +45 -38
- package/lib/testing.js +136 -117
- package/lib/testing.js.map +1 -1
- package/lib/testing.m.js +136 -117
- package/lib/testing.m.js.map +1 -1
- package/package.json +1 -1
- package/src/contracts/platform.ts +1 -1
- package/src/contracts/server.ts +213 -109
- package/src/managers/actions.ts +22 -2
- package/src/scheduling/projection.ts +0 -4
- package/src/scheduling/task-cargo.ts +0 -1
- package/src/types.ts +0 -2
package/lib/shipload.d.ts
CHANGED
|
@@ -287,13 +287,6 @@ declare namespace Types {
|
|
|
287
287
|
speed: UInt16;
|
|
288
288
|
drain: UInt16;
|
|
289
289
|
}
|
|
290
|
-
class createentity extends Struct {
|
|
291
|
-
owner: Name;
|
|
292
|
-
entity_type: Name;
|
|
293
|
-
entity_name: string;
|
|
294
|
-
x: Int64;
|
|
295
|
-
y: Int64;
|
|
296
|
-
}
|
|
297
290
|
class demolish extends Struct {
|
|
298
291
|
entity_id: UInt64;
|
|
299
292
|
}
|
|
@@ -301,6 +294,11 @@ declare namespace Types {
|
|
|
301
294
|
id: UInt64;
|
|
302
295
|
ref: cargo_ref;
|
|
303
296
|
}
|
|
297
|
+
class deploynft extends Struct {
|
|
298
|
+
owner: Name;
|
|
299
|
+
asset_id: UInt64;
|
|
300
|
+
target_nexus_id: UInt64;
|
|
301
|
+
}
|
|
304
302
|
class descentity extends Struct {
|
|
305
303
|
item_id: UInt16;
|
|
306
304
|
hull_stats: UInt64;
|
|
@@ -539,6 +537,38 @@ declare namespace Types {
|
|
|
539
537
|
class hash512 extends Struct {
|
|
540
538
|
value: string;
|
|
541
539
|
}
|
|
540
|
+
class importcargo extends Struct {
|
|
541
|
+
row: cargo_row;
|
|
542
|
+
}
|
|
543
|
+
class importentity extends Struct {
|
|
544
|
+
row: entity_row;
|
|
545
|
+
}
|
|
546
|
+
class importgroup extends Struct {
|
|
547
|
+
row: entitygroup_row;
|
|
548
|
+
}
|
|
549
|
+
class importplayer extends Struct {
|
|
550
|
+
owner: Name;
|
|
551
|
+
}
|
|
552
|
+
class reserve_row extends Struct {
|
|
553
|
+
id: UInt64;
|
|
554
|
+
coord_id: UInt64;
|
|
555
|
+
stratum: UInt16;
|
|
556
|
+
remaining: UInt32;
|
|
557
|
+
}
|
|
558
|
+
class importreserve extends Struct {
|
|
559
|
+
epoch_scope: UInt32;
|
|
560
|
+
row: reserve_row;
|
|
561
|
+
}
|
|
562
|
+
class state_row extends Struct {
|
|
563
|
+
enabled: boolean;
|
|
564
|
+
epoch: UInt32;
|
|
565
|
+
salt: UInt64;
|
|
566
|
+
seed: Checksum256;
|
|
567
|
+
commit: Checksum256;
|
|
568
|
+
}
|
|
569
|
+
class importstate extends Struct {
|
|
570
|
+
row: state_row;
|
|
571
|
+
}
|
|
542
572
|
class initialize extends Struct {
|
|
543
573
|
seed: Checksum256;
|
|
544
574
|
}
|
|
@@ -656,6 +686,7 @@ declare namespace Types {
|
|
|
656
686
|
class nft_template_def extends Struct {
|
|
657
687
|
item_id: UInt16;
|
|
658
688
|
schema_name: Name;
|
|
689
|
+
template_id: Int32;
|
|
659
690
|
}
|
|
660
691
|
class nftconfig_row extends Struct {
|
|
661
692
|
item_id: UInt16;
|
|
@@ -714,12 +745,6 @@ declare namespace Types {
|
|
|
714
745
|
class refrshentity extends Struct {
|
|
715
746
|
entity_id: UInt64;
|
|
716
747
|
}
|
|
717
|
-
class reserve_row extends Struct {
|
|
718
|
-
id: UInt64;
|
|
719
|
-
coord_id: UInt64;
|
|
720
|
-
stratum: UInt16;
|
|
721
|
-
remaining: UInt32;
|
|
722
|
-
}
|
|
723
748
|
class resolve extends Struct {
|
|
724
749
|
id: UInt64;
|
|
725
750
|
count?: UInt64;
|
|
@@ -765,30 +790,6 @@ declare namespace Types {
|
|
|
765
790
|
class skipreveal extends Struct {
|
|
766
791
|
commit: Checksum256;
|
|
767
792
|
}
|
|
768
|
-
class spawncargo extends Struct {
|
|
769
|
-
entity_id: UInt64;
|
|
770
|
-
item_id: UInt64;
|
|
771
|
-
quantity: UInt64;
|
|
772
|
-
}
|
|
773
|
-
class spawnpacked extends Struct {
|
|
774
|
-
entity_id: UInt64;
|
|
775
|
-
item_id: UInt16;
|
|
776
|
-
hull_stats: UInt64;
|
|
777
|
-
installed: packed_module[];
|
|
778
|
-
}
|
|
779
|
-
class spawnseeded extends Struct {
|
|
780
|
-
entity_id: UInt64;
|
|
781
|
-
item_id: UInt64;
|
|
782
|
-
quantity: UInt64;
|
|
783
|
-
stats: UInt64;
|
|
784
|
-
}
|
|
785
|
-
class state_row extends Struct {
|
|
786
|
-
enabled: boolean;
|
|
787
|
-
epoch: UInt32;
|
|
788
|
-
salt: UInt64;
|
|
789
|
-
seed: Checksum256;
|
|
790
|
-
commit: Checksum256;
|
|
791
|
-
}
|
|
792
793
|
class stratum_info extends Struct {
|
|
793
794
|
item_id: UInt16;
|
|
794
795
|
seed: UInt64;
|
|
@@ -829,6 +830,11 @@ declare namespace Types {
|
|
|
829
830
|
host_id: UInt64;
|
|
830
831
|
target_id: UInt64;
|
|
831
832
|
}
|
|
833
|
+
class unwrapnft extends Struct {
|
|
834
|
+
owner: Name;
|
|
835
|
+
asset_id: UInt64;
|
|
836
|
+
host_id: UInt64;
|
|
837
|
+
}
|
|
832
838
|
class warp extends Struct {
|
|
833
839
|
id: UInt64;
|
|
834
840
|
x: Int64;
|
|
@@ -840,7 +846,8 @@ declare namespace Types {
|
|
|
840
846
|
owner: Name;
|
|
841
847
|
entity_id: UInt64;
|
|
842
848
|
nexus_id: UInt64;
|
|
843
|
-
|
|
849
|
+
cargo_id: UInt64;
|
|
850
|
+
quantity: UInt64;
|
|
844
851
|
}
|
|
845
852
|
class wrapentity extends Struct {
|
|
846
853
|
entity_id: UInt64;
|
|
@@ -915,16 +922,70 @@ declare namespace ActionParams {
|
|
|
915
922
|
entity_type: NameType;
|
|
916
923
|
entity_id: UInt64Type;
|
|
917
924
|
}
|
|
918
|
-
interface
|
|
919
|
-
|
|
920
|
-
owner: NameType;
|
|
921
|
-
entity_type: NameType;
|
|
925
|
+
interface cargo_row {
|
|
926
|
+
id: UInt64Type;
|
|
922
927
|
entity_id: UInt64Type;
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
+
item_id: UInt64Type;
|
|
929
|
+
quantity: UInt64Type;
|
|
930
|
+
stats: UInt64Type;
|
|
931
|
+
modules: Type.module_entry[];
|
|
932
|
+
}
|
|
933
|
+
interface entity_row {
|
|
934
|
+
id: UInt64Type;
|
|
935
|
+
owner: NameType;
|
|
936
|
+
kind: NameType;
|
|
937
|
+
name: string;
|
|
938
|
+
stats: UInt64Type;
|
|
939
|
+
coordinates: Type.coordinates;
|
|
940
|
+
hullmass?: UInt32Type;
|
|
941
|
+
capacity?: UInt32Type;
|
|
942
|
+
energy?: UInt16Type;
|
|
943
|
+
cargomass: UInt32Type;
|
|
944
|
+
engines?: Type.movement_stats;
|
|
945
|
+
generator?: Type.energy_stats;
|
|
946
|
+
loaders?: Type.loader_stats;
|
|
947
|
+
gatherer?: Type.gatherer_stats;
|
|
948
|
+
warp?: Type.warp_stats;
|
|
949
|
+
crafter?: Type.crafter_stats;
|
|
950
|
+
hauler?: Type.hauler_stats;
|
|
951
|
+
modules: Type.module_entry[];
|
|
952
|
+
schedule?: Type.schedule;
|
|
953
|
+
item_id: UInt16Type;
|
|
954
|
+
}
|
|
955
|
+
interface movement_stats {
|
|
956
|
+
thrust: UInt32Type;
|
|
957
|
+
drain: UInt16Type;
|
|
958
|
+
}
|
|
959
|
+
interface energy_stats {
|
|
960
|
+
capacity: UInt16Type;
|
|
961
|
+
recharge: UInt16Type;
|
|
962
|
+
}
|
|
963
|
+
interface loader_stats {
|
|
964
|
+
mass: UInt32Type;
|
|
965
|
+
thrust: UInt16Type;
|
|
966
|
+
quantity: UInt8Type;
|
|
967
|
+
}
|
|
968
|
+
interface gatherer_stats {
|
|
969
|
+
yield: UInt16Type;
|
|
970
|
+
drain: UInt16Type;
|
|
971
|
+
depth: UInt16Type;
|
|
972
|
+
speed: UInt16Type;
|
|
973
|
+
}
|
|
974
|
+
interface warp_stats {
|
|
975
|
+
range: UInt32Type;
|
|
976
|
+
}
|
|
977
|
+
interface crafter_stats {
|
|
978
|
+
speed: UInt16Type;
|
|
979
|
+
drain: UInt16Type;
|
|
980
|
+
}
|
|
981
|
+
interface hauler_stats {
|
|
982
|
+
capacity: UInt8Type;
|
|
983
|
+
efficiency: UInt16Type;
|
|
984
|
+
drain: UInt16Type;
|
|
985
|
+
}
|
|
986
|
+
interface schedule {
|
|
987
|
+
started: TimePointType;
|
|
988
|
+
tasks: Type.task[];
|
|
928
989
|
}
|
|
929
990
|
interface task {
|
|
930
991
|
type: UInt8Type;
|
|
@@ -936,6 +997,34 @@ declare namespace ActionParams {
|
|
|
936
997
|
entitygroup?: UInt64Type;
|
|
937
998
|
energy_cost?: UInt16Type;
|
|
938
999
|
}
|
|
1000
|
+
interface entitygroup_row {
|
|
1001
|
+
id: UInt64Type;
|
|
1002
|
+
participants: Type.entity_ref[];
|
|
1003
|
+
}
|
|
1004
|
+
interface reserve_row {
|
|
1005
|
+
id: UInt64Type;
|
|
1006
|
+
coord_id: UInt64Type;
|
|
1007
|
+
stratum: UInt16Type;
|
|
1008
|
+
remaining: UInt32Type;
|
|
1009
|
+
}
|
|
1010
|
+
interface state_row {
|
|
1011
|
+
enabled: boolean;
|
|
1012
|
+
epoch: UInt32Type;
|
|
1013
|
+
salt: UInt64Type;
|
|
1014
|
+
seed: Checksum256Type;
|
|
1015
|
+
commit: Checksum256Type;
|
|
1016
|
+
}
|
|
1017
|
+
interface task_event {
|
|
1018
|
+
event_type: UInt8Type;
|
|
1019
|
+
owner: NameType;
|
|
1020
|
+
entity_type: NameType;
|
|
1021
|
+
entity_id: UInt64Type;
|
|
1022
|
+
task_index: UInt8Type;
|
|
1023
|
+
task: Type.task;
|
|
1024
|
+
starts_at: TimePointType;
|
|
1025
|
+
completes_at: TimePointType;
|
|
1026
|
+
new_energy?: UInt16Type;
|
|
1027
|
+
}
|
|
939
1028
|
}
|
|
940
1029
|
interface addmodule {
|
|
941
1030
|
entity_id: UInt64Type;
|
|
@@ -986,13 +1075,6 @@ declare namespace ActionParams {
|
|
|
986
1075
|
quantity: UInt32Type;
|
|
987
1076
|
inputs: Type.cargo_item[];
|
|
988
1077
|
}
|
|
989
|
-
interface createentity {
|
|
990
|
-
owner: NameType;
|
|
991
|
-
entity_type: NameType;
|
|
992
|
-
entity_name: string;
|
|
993
|
-
x: Int64Type;
|
|
994
|
-
y: Int64Type;
|
|
995
|
-
}
|
|
996
1078
|
interface demolish {
|
|
997
1079
|
entity_id: UInt64Type;
|
|
998
1080
|
}
|
|
@@ -1000,6 +1082,11 @@ declare namespace ActionParams {
|
|
|
1000
1082
|
id: UInt64Type;
|
|
1001
1083
|
ref: Type.cargo_ref;
|
|
1002
1084
|
}
|
|
1085
|
+
interface deploynft {
|
|
1086
|
+
owner: NameType;
|
|
1087
|
+
asset_id: UInt64Type;
|
|
1088
|
+
target_nexus_id: UInt64Type;
|
|
1089
|
+
}
|
|
1003
1090
|
interface descentity {
|
|
1004
1091
|
item_id: UInt16Type;
|
|
1005
1092
|
hull_stats: UInt64Type;
|
|
@@ -1106,6 +1193,25 @@ declare namespace ActionParams {
|
|
|
1106
1193
|
interface hash512 {
|
|
1107
1194
|
value: string;
|
|
1108
1195
|
}
|
|
1196
|
+
interface importcargo {
|
|
1197
|
+
row: Type.cargo_row;
|
|
1198
|
+
}
|
|
1199
|
+
interface importentity {
|
|
1200
|
+
row: Type.entity_row;
|
|
1201
|
+
}
|
|
1202
|
+
interface importgroup {
|
|
1203
|
+
row: Type.entitygroup_row;
|
|
1204
|
+
}
|
|
1205
|
+
interface importplayer {
|
|
1206
|
+
owner: NameType;
|
|
1207
|
+
}
|
|
1208
|
+
interface importreserve {
|
|
1209
|
+
epoch_scope: UInt32Type;
|
|
1210
|
+
row: Type.reserve_row;
|
|
1211
|
+
}
|
|
1212
|
+
interface importstate {
|
|
1213
|
+
row: Type.state_row;
|
|
1214
|
+
}
|
|
1109
1215
|
interface initialize {
|
|
1110
1216
|
seed: Checksum256Type;
|
|
1111
1217
|
}
|
|
@@ -1148,23 +1254,6 @@ declare namespace ActionParams {
|
|
|
1148
1254
|
interface skipreveal {
|
|
1149
1255
|
commit: Checksum256Type;
|
|
1150
1256
|
}
|
|
1151
|
-
interface spawncargo {
|
|
1152
|
-
entity_id: UInt64Type;
|
|
1153
|
-
item_id: UInt64Type;
|
|
1154
|
-
quantity: UInt64Type;
|
|
1155
|
-
}
|
|
1156
|
-
interface spawnpacked {
|
|
1157
|
-
entity_id: UInt64Type;
|
|
1158
|
-
item_id: UInt16Type;
|
|
1159
|
-
hull_stats: UInt64Type;
|
|
1160
|
-
installed: Type.packed_module[];
|
|
1161
|
-
}
|
|
1162
|
-
interface spawnseeded {
|
|
1163
|
-
entity_id: UInt64Type;
|
|
1164
|
-
item_id: UInt64Type;
|
|
1165
|
-
quantity: UInt64Type;
|
|
1166
|
-
stats: UInt64Type;
|
|
1167
|
-
}
|
|
1168
1257
|
interface transfer {
|
|
1169
1258
|
source_id: UInt64Type;
|
|
1170
1259
|
dest_id: UInt64Type;
|
|
@@ -1180,6 +1269,11 @@ declare namespace ActionParams {
|
|
|
1180
1269
|
host_id: UInt64Type;
|
|
1181
1270
|
target_id: UInt64Type;
|
|
1182
1271
|
}
|
|
1272
|
+
interface unwrapnft {
|
|
1273
|
+
owner: NameType;
|
|
1274
|
+
asset_id: UInt64Type;
|
|
1275
|
+
host_id: UInt64Type;
|
|
1276
|
+
}
|
|
1183
1277
|
interface warp {
|
|
1184
1278
|
id: UInt64Type;
|
|
1185
1279
|
x: Int64Type;
|
|
@@ -1191,7 +1285,8 @@ declare namespace ActionParams {
|
|
|
1191
1285
|
owner: NameType;
|
|
1192
1286
|
entity_id: UInt64Type;
|
|
1193
1287
|
nexus_id: UInt64Type;
|
|
1194
|
-
|
|
1288
|
+
cargo_id: UInt64Type;
|
|
1289
|
+
quantity: UInt64Type;
|
|
1195
1290
|
}
|
|
1196
1291
|
interface wrapentity {
|
|
1197
1292
|
entity_id: UInt64Type;
|
|
@@ -1210,9 +1305,9 @@ interface ActionNameParams {
|
|
|
1210
1305
|
commit: ActionParams.commit;
|
|
1211
1306
|
configlog: ActionParams.configlog;
|
|
1212
1307
|
craft: ActionParams.craft;
|
|
1213
|
-
createentity: ActionParams.createentity;
|
|
1214
1308
|
demolish: ActionParams.demolish;
|
|
1215
1309
|
deploy: ActionParams.deploy;
|
|
1310
|
+
deploynft: ActionParams.deploynft;
|
|
1216
1311
|
descentity: ActionParams.descentity;
|
|
1217
1312
|
enable: ActionParams.enable;
|
|
1218
1313
|
fixcargomass: ActionParams.fixcargomass;
|
|
@@ -1246,6 +1341,12 @@ interface ActionNameParams {
|
|
|
1246
1341
|
grouptravel: ActionParams.grouptravel;
|
|
1247
1342
|
hash: ActionParams.hash;
|
|
1248
1343
|
hash512: ActionParams.hash512;
|
|
1344
|
+
importcargo: ActionParams.importcargo;
|
|
1345
|
+
importentity: ActionParams.importentity;
|
|
1346
|
+
importgroup: ActionParams.importgroup;
|
|
1347
|
+
importplayer: ActionParams.importplayer;
|
|
1348
|
+
importreserve: ActionParams.importreserve;
|
|
1349
|
+
importstate: ActionParams.importstate;
|
|
1249
1350
|
initialize: ActionParams.initialize;
|
|
1250
1351
|
join: ActionParams.join;
|
|
1251
1352
|
nftimgurl: ActionParams.nftimgurl;
|
|
@@ -1258,12 +1359,10 @@ interface ActionNameParams {
|
|
|
1258
1359
|
salt: ActionParams.salt;
|
|
1259
1360
|
setnftcfg: ActionParams.setnftcfg;
|
|
1260
1361
|
skipreveal: ActionParams.skipreveal;
|
|
1261
|
-
spawncargo: ActionParams.spawncargo;
|
|
1262
|
-
spawnpacked: ActionParams.spawnpacked;
|
|
1263
|
-
spawnseeded: ActionParams.spawnseeded;
|
|
1264
1362
|
transfer: ActionParams.transfer;
|
|
1265
1363
|
travel: ActionParams.travel;
|
|
1266
1364
|
undeploy: ActionParams.undeploy;
|
|
1365
|
+
unwrapnft: ActionParams.unwrapnft;
|
|
1267
1366
|
warp: ActionParams.warp;
|
|
1268
1367
|
wipe: ActionParams.wipe;
|
|
1269
1368
|
wrap: ActionParams.wrap;
|
|
@@ -1275,6 +1374,7 @@ interface ActionReturnValues {
|
|
|
1275
1374
|
craft: Types.task_results;
|
|
1276
1375
|
demolish: Types.task_results;
|
|
1277
1376
|
deploy: Types.task_results;
|
|
1377
|
+
deploynft: Types.task_results;
|
|
1278
1378
|
descentity: string;
|
|
1279
1379
|
gather: Types.task_results;
|
|
1280
1380
|
getconfig: Types.game_config;
|
|
@@ -1312,6 +1412,7 @@ interface ActionReturnValues {
|
|
|
1312
1412
|
transfer: Types.task_results;
|
|
1313
1413
|
travel: Types.task_results;
|
|
1314
1414
|
undeploy: Types.task_results;
|
|
1415
|
+
unwrapnft: Types.task_results;
|
|
1315
1416
|
warp: Types.task_results;
|
|
1316
1417
|
wrap: Types.task_results;
|
|
1317
1418
|
wrapentity: Types.task_results;
|
|
@@ -1476,10 +1577,8 @@ declare enum TaskType {
|
|
|
1476
1577
|
WARP = 6,
|
|
1477
1578
|
CRAFT = 7,
|
|
1478
1579
|
DEPLOY = 8,
|
|
1479
|
-
WRAP = 9,
|
|
1480
1580
|
UNWRAP = 10,
|
|
1481
1581
|
UNDEPLOY = 11,
|
|
1482
|
-
WRAP_ENTITY = 12,
|
|
1483
1582
|
DEMOLISH = 13
|
|
1484
1583
|
}
|
|
1485
1584
|
declare enum LocationType {
|
|
@@ -2250,9 +2349,11 @@ declare class ActionsManager extends BaseManager {
|
|
|
2250
2349
|
deploy(entityId: UInt64Type, ref: ActionParams.Type.cargo_ref): Action;
|
|
2251
2350
|
addmodule(entityId: UInt64Type, moduleIndex: number, moduleRef: ActionParams.Type.cargo_ref, targetRef?: ActionParams.Type.cargo_ref | null): Action;
|
|
2252
2351
|
rmmodule(entityId: UInt64Type, moduleIndex: number, targetRef?: ActionParams.Type.cargo_ref | null): Action;
|
|
2253
|
-
wrap(owner: NameType, entityId: UInt64Type, nexusId: UInt64Type,
|
|
2352
|
+
wrap(owner: NameType, entityId: UInt64Type, nexusId: UInt64Type, cargoId: UInt64Type, quantity: UInt64Type): Action;
|
|
2254
2353
|
undeploy(hostId: UInt64Type, targetId: UInt64Type): Action;
|
|
2255
2354
|
wrapEntity(entityId: UInt64Type, nexusId: UInt64Type): Action;
|
|
2355
|
+
deploynft(owner: NameType, assetId: UInt64Type, targetNexusId: UInt64Type): Action;
|
|
2356
|
+
unwrapnft(owner: NameType, assetId: UInt64Type, hostId: UInt64Type): Action;
|
|
2256
2357
|
demolish(entityId: UInt64Type): Action;
|
|
2257
2358
|
joinGame(account: NameType, companyName: string): Action[];
|
|
2258
2359
|
}
|