@shipload/sdk 1.0.0-next.11 → 1.0.0-next.13
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 +779 -984
- package/lib/shipload.js +2203 -2738
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +2186 -2712
- package/lib/shipload.m.js.map +1 -1
- package/lib/testing.d.ts +713 -0
- package/lib/testing.js +3065 -0
- package/lib/testing.js.map +1 -0
- package/lib/testing.m.js +3059 -0
- package/lib/testing.m.js.map +1 -0
- package/package.json +14 -1
- package/src/data/kind-registry.json +78 -0
- package/src/data/kind-registry.ts +133 -0
- package/src/derivation/capabilities.ts +397 -0
- package/src/derivation/crafting.ts +1 -1
- package/src/entities/entity.ts +98 -0
- package/src/entities/makers.ts +75 -228
- package/src/index-module.ts +30 -34
- package/src/managers/entities.ts +18 -114
- package/src/managers/index.ts +1 -1
- package/src/nft/atomicdata.ts +2 -0
- package/src/nft/description.ts +1 -1
- package/src/resolution/resolve-item.ts +3 -2
- package/src/subscriptions/manager.ts +2 -5
- package/src/subscriptions/mappers.ts +3 -12
- package/src/testing/catalog-hash.ts +19 -0
- package/src/testing/index.ts +2 -0
- package/src/testing/projection-parity.ts +143 -0
- package/src/types/index.ts +0 -1
- package/src/types.ts +0 -9
- package/src/entities/container.ts +0 -123
- package/src/entities/extractor.ts +0 -144
- package/src/entities/factory.ts +0 -135
- package/src/entities/nexus.ts +0 -29
- package/src/entities/ship-deploy.ts +0 -316
- package/src/entities/ship.ts +0 -221
- package/src/entities/warehouse.ts +0 -136
- package/src/types/entity-traits.ts +0 -171
package/lib/testing.d.ts
ADDED
|
@@ -0,0 +1,713 @@
|
|
|
1
|
+
import { Struct, UInt16, UInt64, UInt8, Int64, Checksum256, UInt32, Name, TimePoint, Bytes, Int32, Int64Type } from '@wharfkit/antelope';
|
|
2
|
+
|
|
3
|
+
declare const CATALOG_FILES_REL: readonly ["items.json", "recipes.json", "entities.json", "kind-registry.json", "item-ids.ts"];
|
|
4
|
+
declare function computeCatalogHash(filePaths: ReadonlyArray<string>): string;
|
|
5
|
+
|
|
6
|
+
declare namespace Types {
|
|
7
|
+
class packed_module extends Struct {
|
|
8
|
+
item_id: UInt16;
|
|
9
|
+
stats: UInt64;
|
|
10
|
+
}
|
|
11
|
+
class module_entry extends Struct {
|
|
12
|
+
type: UInt8;
|
|
13
|
+
installed?: packed_module;
|
|
14
|
+
}
|
|
15
|
+
class cargo_ref extends Struct {
|
|
16
|
+
item_id: UInt16;
|
|
17
|
+
stats: UInt64;
|
|
18
|
+
modules: module_entry[];
|
|
19
|
+
}
|
|
20
|
+
class addmodule extends Struct {
|
|
21
|
+
entity_id: UInt64;
|
|
22
|
+
module_index: UInt8;
|
|
23
|
+
module_ref: cargo_ref;
|
|
24
|
+
target_ref?: cargo_ref;
|
|
25
|
+
}
|
|
26
|
+
class addnexus extends Struct {
|
|
27
|
+
nexus_name: string;
|
|
28
|
+
x: Int64;
|
|
29
|
+
y: Int64;
|
|
30
|
+
}
|
|
31
|
+
class advance extends Struct {
|
|
32
|
+
reveal: string;
|
|
33
|
+
commit: Checksum256;
|
|
34
|
+
}
|
|
35
|
+
class cargo_item extends Struct {
|
|
36
|
+
item_id: UInt16;
|
|
37
|
+
stats: UInt64;
|
|
38
|
+
modules: module_entry[];
|
|
39
|
+
quantity: UInt32;
|
|
40
|
+
}
|
|
41
|
+
class blend extends Struct {
|
|
42
|
+
id: UInt64;
|
|
43
|
+
inputs: cargo_item[];
|
|
44
|
+
}
|
|
45
|
+
class cancel extends Struct {
|
|
46
|
+
id: UInt64;
|
|
47
|
+
count: UInt64;
|
|
48
|
+
}
|
|
49
|
+
class entity_ref extends Struct {
|
|
50
|
+
entity_type: Name;
|
|
51
|
+
entity_id: UInt64;
|
|
52
|
+
}
|
|
53
|
+
class cancel_results extends Struct {
|
|
54
|
+
entity_id: UInt64;
|
|
55
|
+
entity_type: Name;
|
|
56
|
+
cancelled_count: UInt8;
|
|
57
|
+
schedule_started?: TimePoint;
|
|
58
|
+
entitygroup?: UInt64;
|
|
59
|
+
group_members?: entity_ref[];
|
|
60
|
+
}
|
|
61
|
+
class cargo_row extends Struct {
|
|
62
|
+
id: UInt64;
|
|
63
|
+
entity_id: UInt64;
|
|
64
|
+
item_id: UInt64;
|
|
65
|
+
quantity: UInt64;
|
|
66
|
+
stats: UInt64;
|
|
67
|
+
modules: module_entry[];
|
|
68
|
+
}
|
|
69
|
+
class cargo_view extends Struct {
|
|
70
|
+
item_id: UInt16;
|
|
71
|
+
stats: UInt64;
|
|
72
|
+
modules: module_entry[];
|
|
73
|
+
quantity: UInt32;
|
|
74
|
+
id: UInt64;
|
|
75
|
+
}
|
|
76
|
+
class claimstarter extends Struct {
|
|
77
|
+
account: Name;
|
|
78
|
+
x: Int64;
|
|
79
|
+
y: Int64;
|
|
80
|
+
}
|
|
81
|
+
class cleanrsvp extends Struct {
|
|
82
|
+
epoch: UInt64;
|
|
83
|
+
max_rows: UInt64;
|
|
84
|
+
}
|
|
85
|
+
class cleartable extends Struct {
|
|
86
|
+
table_name: Name;
|
|
87
|
+
scope?: Name;
|
|
88
|
+
max_rows?: UInt64;
|
|
89
|
+
}
|
|
90
|
+
class commit extends Struct {
|
|
91
|
+
commit: Checksum256;
|
|
92
|
+
}
|
|
93
|
+
class entity_defaults extends Struct {
|
|
94
|
+
warehouse_z: UInt16;
|
|
95
|
+
container_z: UInt16;
|
|
96
|
+
}
|
|
97
|
+
class item_def extends Struct {
|
|
98
|
+
id: UInt16;
|
|
99
|
+
mass: UInt32;
|
|
100
|
+
type: UInt8;
|
|
101
|
+
subtype: UInt8;
|
|
102
|
+
tier: UInt8;
|
|
103
|
+
}
|
|
104
|
+
class game_config extends Struct {
|
|
105
|
+
version: UInt32;
|
|
106
|
+
defaults: entity_defaults;
|
|
107
|
+
items: item_def[];
|
|
108
|
+
}
|
|
109
|
+
class configlog extends Struct {
|
|
110
|
+
config: game_config;
|
|
111
|
+
}
|
|
112
|
+
class coordinates extends Struct {
|
|
113
|
+
x: Int64;
|
|
114
|
+
y: Int64;
|
|
115
|
+
z?: UInt16;
|
|
116
|
+
}
|
|
117
|
+
class craft extends Struct {
|
|
118
|
+
id: UInt64;
|
|
119
|
+
recipe_id: UInt16;
|
|
120
|
+
quantity: UInt32;
|
|
121
|
+
inputs: cargo_item[];
|
|
122
|
+
}
|
|
123
|
+
class crafter_stats extends Struct {
|
|
124
|
+
speed: UInt16;
|
|
125
|
+
drain: UInt16;
|
|
126
|
+
}
|
|
127
|
+
class createentity extends Struct {
|
|
128
|
+
owner: Name;
|
|
129
|
+
entity_type: Name;
|
|
130
|
+
entity_name: string;
|
|
131
|
+
x: Int64;
|
|
132
|
+
y: Int64;
|
|
133
|
+
}
|
|
134
|
+
class demolish extends Struct {
|
|
135
|
+
entity_id: UInt64;
|
|
136
|
+
}
|
|
137
|
+
class deploy extends Struct {
|
|
138
|
+
id: UInt64;
|
|
139
|
+
ref: cargo_ref;
|
|
140
|
+
}
|
|
141
|
+
class descentity extends Struct {
|
|
142
|
+
item_id: UInt16;
|
|
143
|
+
hull_stats: UInt64;
|
|
144
|
+
module_items: UInt16[];
|
|
145
|
+
module_stats: UInt64[];
|
|
146
|
+
}
|
|
147
|
+
class enable extends Struct {
|
|
148
|
+
enabled: boolean;
|
|
149
|
+
}
|
|
150
|
+
class energy_stats extends Struct {
|
|
151
|
+
capacity: UInt16;
|
|
152
|
+
recharge: UInt16;
|
|
153
|
+
}
|
|
154
|
+
class entity_current_state extends Struct {
|
|
155
|
+
coordinates: coordinates;
|
|
156
|
+
energy: UInt16;
|
|
157
|
+
}
|
|
158
|
+
class loader_stats extends Struct {
|
|
159
|
+
mass: UInt32;
|
|
160
|
+
thrust: UInt16;
|
|
161
|
+
quantity: UInt8;
|
|
162
|
+
}
|
|
163
|
+
class movement_stats extends Struct {
|
|
164
|
+
thrust: UInt32;
|
|
165
|
+
drain: UInt16;
|
|
166
|
+
}
|
|
167
|
+
class gatherer_stats extends Struct {
|
|
168
|
+
yield: UInt16;
|
|
169
|
+
drain: UInt16;
|
|
170
|
+
depth: UInt16;
|
|
171
|
+
speed: UInt16;
|
|
172
|
+
}
|
|
173
|
+
class hauler_stats extends Struct {
|
|
174
|
+
capacity: UInt8;
|
|
175
|
+
efficiency: UInt16;
|
|
176
|
+
drain: UInt16;
|
|
177
|
+
}
|
|
178
|
+
class warp_stats extends Struct {
|
|
179
|
+
range: UInt32;
|
|
180
|
+
}
|
|
181
|
+
class task extends Struct {
|
|
182
|
+
type: UInt8;
|
|
183
|
+
duration: UInt32;
|
|
184
|
+
cancelable: UInt8;
|
|
185
|
+
coordinates?: coordinates;
|
|
186
|
+
cargo: cargo_item[];
|
|
187
|
+
entitytarget?: entity_ref;
|
|
188
|
+
entitygroup?: UInt64;
|
|
189
|
+
energy_cost?: UInt16;
|
|
190
|
+
}
|
|
191
|
+
class schedule extends Struct {
|
|
192
|
+
started: TimePoint;
|
|
193
|
+
tasks: task[];
|
|
194
|
+
}
|
|
195
|
+
class entity_info extends Struct {
|
|
196
|
+
type: Name;
|
|
197
|
+
id: UInt64;
|
|
198
|
+
owner: Name;
|
|
199
|
+
entity_name: string;
|
|
200
|
+
coordinates: coordinates;
|
|
201
|
+
cargomass: UInt32;
|
|
202
|
+
cargo: cargo_view[];
|
|
203
|
+
loaders?: loader_stats;
|
|
204
|
+
modules: module_entry[];
|
|
205
|
+
energy?: UInt16;
|
|
206
|
+
hullmass?: UInt32;
|
|
207
|
+
engines?: movement_stats;
|
|
208
|
+
generator?: energy_stats;
|
|
209
|
+
capacity?: UInt32;
|
|
210
|
+
gatherer?: gatherer_stats;
|
|
211
|
+
hauler?: hauler_stats;
|
|
212
|
+
warp?: warp_stats;
|
|
213
|
+
crafter?: crafter_stats;
|
|
214
|
+
is_idle: boolean;
|
|
215
|
+
current_task?: task;
|
|
216
|
+
current_task_elapsed: UInt32;
|
|
217
|
+
current_task_remaining: UInt32;
|
|
218
|
+
pending_tasks: task[];
|
|
219
|
+
idle_at?: TimePoint;
|
|
220
|
+
schedule?: schedule;
|
|
221
|
+
}
|
|
222
|
+
class slot_def extends Struct {
|
|
223
|
+
type: UInt8;
|
|
224
|
+
output_pct: UInt16;
|
|
225
|
+
}
|
|
226
|
+
class entity_layout extends Struct {
|
|
227
|
+
entity_item_id: UInt16;
|
|
228
|
+
slots: slot_def[];
|
|
229
|
+
}
|
|
230
|
+
class entity_layouts_result extends Struct {
|
|
231
|
+
entities: entity_layout[];
|
|
232
|
+
}
|
|
233
|
+
class entity_row extends Struct {
|
|
234
|
+
id: UInt64;
|
|
235
|
+
owner: Name;
|
|
236
|
+
kind: Name;
|
|
237
|
+
name: string;
|
|
238
|
+
stats: UInt64;
|
|
239
|
+
coordinates: coordinates;
|
|
240
|
+
hullmass?: UInt32;
|
|
241
|
+
capacity?: UInt32;
|
|
242
|
+
energy?: UInt16;
|
|
243
|
+
cargomass: UInt32;
|
|
244
|
+
engines?: movement_stats;
|
|
245
|
+
generator?: energy_stats;
|
|
246
|
+
loaders?: loader_stats;
|
|
247
|
+
gatherer?: gatherer_stats;
|
|
248
|
+
warp?: warp_stats;
|
|
249
|
+
crafter?: crafter_stats;
|
|
250
|
+
hauler?: hauler_stats;
|
|
251
|
+
modules: module_entry[];
|
|
252
|
+
schedule?: schedule;
|
|
253
|
+
item_id: UInt16;
|
|
254
|
+
}
|
|
255
|
+
class entity_summary extends Struct {
|
|
256
|
+
type: Name;
|
|
257
|
+
id: UInt64;
|
|
258
|
+
owner: Name;
|
|
259
|
+
entity_name: string;
|
|
260
|
+
coordinates: coordinates;
|
|
261
|
+
is_idle: boolean;
|
|
262
|
+
resolved_count: UInt32;
|
|
263
|
+
pending_count: UInt32;
|
|
264
|
+
}
|
|
265
|
+
class entity_task_info extends Struct {
|
|
266
|
+
entity_id: UInt64;
|
|
267
|
+
entity_type: Name;
|
|
268
|
+
task_count: UInt8;
|
|
269
|
+
schedule_started: TimePoint;
|
|
270
|
+
}
|
|
271
|
+
class entitygroup_row extends Struct {
|
|
272
|
+
id: UInt64;
|
|
273
|
+
participants: entity_ref[];
|
|
274
|
+
}
|
|
275
|
+
class enum_member extends Struct {
|
|
276
|
+
value: UInt8;
|
|
277
|
+
name: string;
|
|
278
|
+
}
|
|
279
|
+
class enum_result extends Struct {
|
|
280
|
+
members: enum_member[];
|
|
281
|
+
}
|
|
282
|
+
class fixcargomass extends Struct {
|
|
283
|
+
entity_id: UInt64;
|
|
284
|
+
}
|
|
285
|
+
class gather extends Struct {
|
|
286
|
+
source_id: UInt64;
|
|
287
|
+
destination_id: UInt64;
|
|
288
|
+
stratum: UInt16;
|
|
289
|
+
quantity: UInt32;
|
|
290
|
+
}
|
|
291
|
+
class getconfig extends Struct {
|
|
292
|
+
}
|
|
293
|
+
class geteligible extends Struct {
|
|
294
|
+
coords: coordinates;
|
|
295
|
+
stratum: UInt16;
|
|
296
|
+
}
|
|
297
|
+
class getentities extends Struct {
|
|
298
|
+
owner: Name;
|
|
299
|
+
entity_type?: Name;
|
|
300
|
+
}
|
|
301
|
+
class getentity extends Struct {
|
|
302
|
+
entity_id: UInt64;
|
|
303
|
+
}
|
|
304
|
+
class getitemdata extends Struct {
|
|
305
|
+
}
|
|
306
|
+
class getitemids extends Struct {
|
|
307
|
+
}
|
|
308
|
+
class getitems extends Struct {
|
|
309
|
+
}
|
|
310
|
+
class getitemtypes extends Struct {
|
|
311
|
+
}
|
|
312
|
+
class getlocation extends Struct {
|
|
313
|
+
x: Int64;
|
|
314
|
+
y: Int64;
|
|
315
|
+
}
|
|
316
|
+
class getlocdata extends Struct {
|
|
317
|
+
x: Int64;
|
|
318
|
+
y: Int64;
|
|
319
|
+
}
|
|
320
|
+
class getmodtypes extends Struct {
|
|
321
|
+
}
|
|
322
|
+
class getmodules extends Struct {
|
|
323
|
+
}
|
|
324
|
+
class getnearby extends Struct {
|
|
325
|
+
entity_id: UInt64;
|
|
326
|
+
recharge: boolean;
|
|
327
|
+
}
|
|
328
|
+
class getnftinfo extends Struct {
|
|
329
|
+
}
|
|
330
|
+
class getplayer extends Struct {
|
|
331
|
+
account: Name;
|
|
332
|
+
}
|
|
333
|
+
class getrecipe extends Struct {
|
|
334
|
+
output_item_id: UInt16;
|
|
335
|
+
}
|
|
336
|
+
class getrecipes extends Struct {
|
|
337
|
+
lower_bound: UInt16;
|
|
338
|
+
limit: UInt8;
|
|
339
|
+
}
|
|
340
|
+
class getrescats extends Struct {
|
|
341
|
+
}
|
|
342
|
+
class getreserves extends Struct {
|
|
343
|
+
x: Int64;
|
|
344
|
+
y: Int64;
|
|
345
|
+
}
|
|
346
|
+
class getresources extends Struct {
|
|
347
|
+
}
|
|
348
|
+
class getslots extends Struct {
|
|
349
|
+
}
|
|
350
|
+
class getstratum extends Struct {
|
|
351
|
+
x: Int64;
|
|
352
|
+
y: Int64;
|
|
353
|
+
stratum: UInt16;
|
|
354
|
+
}
|
|
355
|
+
class getsummaries extends Struct {
|
|
356
|
+
owner: Name;
|
|
357
|
+
entity_type?: Name;
|
|
358
|
+
}
|
|
359
|
+
class grouptravel extends Struct {
|
|
360
|
+
entities: entity_ref[];
|
|
361
|
+
x: Int64;
|
|
362
|
+
y: Int64;
|
|
363
|
+
recharge: boolean;
|
|
364
|
+
}
|
|
365
|
+
class hash extends Struct {
|
|
366
|
+
value: string;
|
|
367
|
+
}
|
|
368
|
+
class hash512 extends Struct {
|
|
369
|
+
value: string;
|
|
370
|
+
}
|
|
371
|
+
class initialize extends Struct {
|
|
372
|
+
seed: Checksum256;
|
|
373
|
+
}
|
|
374
|
+
class item_id_pair extends Struct {
|
|
375
|
+
id: UInt16;
|
|
376
|
+
name: string;
|
|
377
|
+
}
|
|
378
|
+
class item_ids_result extends Struct {
|
|
379
|
+
items: item_id_pair[];
|
|
380
|
+
}
|
|
381
|
+
class recipe_input extends Struct {
|
|
382
|
+
item_id: UInt16;
|
|
383
|
+
category: UInt8;
|
|
384
|
+
tier: UInt8;
|
|
385
|
+
quantity: UInt32;
|
|
386
|
+
}
|
|
387
|
+
class stat_source extends Struct {
|
|
388
|
+
input_index: UInt8;
|
|
389
|
+
input_stat_index: UInt8;
|
|
390
|
+
}
|
|
391
|
+
class stat_slot_response extends Struct {
|
|
392
|
+
sources: stat_source[];
|
|
393
|
+
}
|
|
394
|
+
class recipe_item_info extends Struct {
|
|
395
|
+
id: UInt16;
|
|
396
|
+
mass: UInt32;
|
|
397
|
+
}
|
|
398
|
+
class recipe_response extends Struct {
|
|
399
|
+
output_item_id: UInt16;
|
|
400
|
+
output_mass: UInt32;
|
|
401
|
+
inputs: recipe_input[];
|
|
402
|
+
stat_slots: stat_slot_response[];
|
|
403
|
+
blend_weights: Bytes;
|
|
404
|
+
output_item: recipe_item_info;
|
|
405
|
+
input_items: recipe_item_info[];
|
|
406
|
+
}
|
|
407
|
+
class recipes_result extends Struct {
|
|
408
|
+
recipes: recipe_response[];
|
|
409
|
+
}
|
|
410
|
+
class itemdata_result extends Struct {
|
|
411
|
+
items: item_def[];
|
|
412
|
+
recipes: recipes_result;
|
|
413
|
+
}
|
|
414
|
+
class items_info extends Struct {
|
|
415
|
+
items: item_def[];
|
|
416
|
+
}
|
|
417
|
+
class join extends Struct {
|
|
418
|
+
account: Name;
|
|
419
|
+
}
|
|
420
|
+
class location_static extends Struct {
|
|
421
|
+
coords: coordinates;
|
|
422
|
+
type: UInt8;
|
|
423
|
+
subtype: UInt8;
|
|
424
|
+
seed0: UInt8;
|
|
425
|
+
seed1: UInt8;
|
|
426
|
+
}
|
|
427
|
+
class location_derived extends Struct {
|
|
428
|
+
static_props: location_static;
|
|
429
|
+
size: UInt16;
|
|
430
|
+
}
|
|
431
|
+
class location_info extends Struct {
|
|
432
|
+
coords: coordinates;
|
|
433
|
+
is_system: boolean;
|
|
434
|
+
}
|
|
435
|
+
class module_info extends Struct {
|
|
436
|
+
id: UInt16;
|
|
437
|
+
mass: UInt32;
|
|
438
|
+
module_type: UInt8;
|
|
439
|
+
tier: UInt8;
|
|
440
|
+
}
|
|
441
|
+
class modules_result extends Struct {
|
|
442
|
+
modules: module_info[];
|
|
443
|
+
}
|
|
444
|
+
class nearby_system extends Struct {
|
|
445
|
+
distance: UInt64;
|
|
446
|
+
energy_cost: UInt64;
|
|
447
|
+
flight_time: UInt32;
|
|
448
|
+
location: location_info;
|
|
449
|
+
}
|
|
450
|
+
class nearby_info extends Struct {
|
|
451
|
+
can_travel: boolean;
|
|
452
|
+
current: entity_current_state;
|
|
453
|
+
projected: entity_current_state;
|
|
454
|
+
max_energy: UInt16;
|
|
455
|
+
systems: nearby_system[];
|
|
456
|
+
}
|
|
457
|
+
class schema_field extends Struct {
|
|
458
|
+
name: string;
|
|
459
|
+
field_type: string;
|
|
460
|
+
}
|
|
461
|
+
class nft_schema_def extends Struct {
|
|
462
|
+
schema_name: Name;
|
|
463
|
+
fields: schema_field[];
|
|
464
|
+
}
|
|
465
|
+
class nft_template_def extends Struct {
|
|
466
|
+
item_id: UInt16;
|
|
467
|
+
schema_name: Name;
|
|
468
|
+
}
|
|
469
|
+
class nftconfig_row extends Struct {
|
|
470
|
+
item_id: UInt16;
|
|
471
|
+
template_id: Int32;
|
|
472
|
+
schema_name: Name;
|
|
473
|
+
}
|
|
474
|
+
class nftinfo_result extends Struct {
|
|
475
|
+
schemas: nft_schema_def[];
|
|
476
|
+
templates: nft_template_def[];
|
|
477
|
+
}
|
|
478
|
+
class task_event extends Struct {
|
|
479
|
+
event_type: UInt8;
|
|
480
|
+
owner: Name;
|
|
481
|
+
entity_type: Name;
|
|
482
|
+
entity_id: UInt64;
|
|
483
|
+
task_index: UInt8;
|
|
484
|
+
task: task;
|
|
485
|
+
starts_at: TimePoint;
|
|
486
|
+
completes_at: TimePoint;
|
|
487
|
+
new_energy?: UInt16;
|
|
488
|
+
}
|
|
489
|
+
class notify extends Struct {
|
|
490
|
+
event: task_event;
|
|
491
|
+
}
|
|
492
|
+
class player_info extends Struct {
|
|
493
|
+
owner: Name;
|
|
494
|
+
is_player: boolean;
|
|
495
|
+
company_name: string;
|
|
496
|
+
}
|
|
497
|
+
class player_row extends Struct {
|
|
498
|
+
owner: Name;
|
|
499
|
+
}
|
|
500
|
+
class recharge extends Struct {
|
|
501
|
+
id: UInt64;
|
|
502
|
+
}
|
|
503
|
+
class refrshentity extends Struct {
|
|
504
|
+
entity_id: UInt64;
|
|
505
|
+
}
|
|
506
|
+
class reserve_row extends Struct {
|
|
507
|
+
id: UInt64;
|
|
508
|
+
coord_id: UInt64;
|
|
509
|
+
stratum: UInt16;
|
|
510
|
+
remaining: UInt32;
|
|
511
|
+
}
|
|
512
|
+
class resolve extends Struct {
|
|
513
|
+
id: UInt64;
|
|
514
|
+
count?: UInt64;
|
|
515
|
+
}
|
|
516
|
+
class resolve_results extends Struct {
|
|
517
|
+
entity_id: UInt64;
|
|
518
|
+
entity_type: Name;
|
|
519
|
+
resolved_count: UInt8;
|
|
520
|
+
new_schedule_started?: TimePoint;
|
|
521
|
+
entitygroup?: UInt64;
|
|
522
|
+
group_members?: entity_ref[];
|
|
523
|
+
}
|
|
524
|
+
class resource_info extends Struct {
|
|
525
|
+
id: UInt16;
|
|
526
|
+
mass: UInt32;
|
|
527
|
+
category: UInt8;
|
|
528
|
+
tier: UInt8;
|
|
529
|
+
}
|
|
530
|
+
class resource_stats extends Struct {
|
|
531
|
+
stat1: UInt16;
|
|
532
|
+
stat2: UInt16;
|
|
533
|
+
stat3: UInt16;
|
|
534
|
+
}
|
|
535
|
+
class resources_result extends Struct {
|
|
536
|
+
resources: resource_info[];
|
|
537
|
+
}
|
|
538
|
+
class rmmodule extends Struct {
|
|
539
|
+
entity_id: UInt64;
|
|
540
|
+
module_index: UInt8;
|
|
541
|
+
target_ref?: cargo_ref;
|
|
542
|
+
}
|
|
543
|
+
class rmnftcfg extends Struct {
|
|
544
|
+
item_id: UInt16;
|
|
545
|
+
}
|
|
546
|
+
class salt extends Struct {
|
|
547
|
+
salt: UInt64;
|
|
548
|
+
}
|
|
549
|
+
class setnftcfg extends Struct {
|
|
550
|
+
item_id: UInt16;
|
|
551
|
+
template_id: Int32;
|
|
552
|
+
schema_name: Name;
|
|
553
|
+
}
|
|
554
|
+
class skipreveal extends Struct {
|
|
555
|
+
commit: Checksum256;
|
|
556
|
+
}
|
|
557
|
+
class spawncargo extends Struct {
|
|
558
|
+
entity_id: UInt64;
|
|
559
|
+
item_id: UInt64;
|
|
560
|
+
quantity: UInt64;
|
|
561
|
+
}
|
|
562
|
+
class spawnpacked extends Struct {
|
|
563
|
+
entity_id: UInt64;
|
|
564
|
+
item_id: UInt16;
|
|
565
|
+
hull_stats: UInt64;
|
|
566
|
+
installed: packed_module[];
|
|
567
|
+
}
|
|
568
|
+
class spawnseeded extends Struct {
|
|
569
|
+
entity_id: UInt64;
|
|
570
|
+
item_id: UInt64;
|
|
571
|
+
quantity: UInt64;
|
|
572
|
+
stats: UInt64;
|
|
573
|
+
}
|
|
574
|
+
class state_row extends Struct {
|
|
575
|
+
enabled: boolean;
|
|
576
|
+
epoch: UInt32;
|
|
577
|
+
salt: UInt64;
|
|
578
|
+
seed: Checksum256;
|
|
579
|
+
commit: Checksum256;
|
|
580
|
+
}
|
|
581
|
+
class stratum_info extends Struct {
|
|
582
|
+
item_id: UInt16;
|
|
583
|
+
seed: UInt64;
|
|
584
|
+
richness: UInt16;
|
|
585
|
+
reserve: UInt32;
|
|
586
|
+
reserve_max: UInt32;
|
|
587
|
+
}
|
|
588
|
+
class stratum_data extends Struct {
|
|
589
|
+
stratum: stratum_info;
|
|
590
|
+
stats: resource_stats;
|
|
591
|
+
}
|
|
592
|
+
class stratum_remaining extends Struct {
|
|
593
|
+
stratum: UInt16;
|
|
594
|
+
remaining: UInt32;
|
|
595
|
+
}
|
|
596
|
+
class task_results extends Struct {
|
|
597
|
+
entities: entity_task_info[];
|
|
598
|
+
}
|
|
599
|
+
class transfer extends Struct {
|
|
600
|
+
source_id: UInt64;
|
|
601
|
+
dest_id: UInt64;
|
|
602
|
+
items: cargo_item[];
|
|
603
|
+
}
|
|
604
|
+
class travel extends Struct {
|
|
605
|
+
id: UInt64;
|
|
606
|
+
x: Int64;
|
|
607
|
+
y: Int64;
|
|
608
|
+
recharge: boolean;
|
|
609
|
+
}
|
|
610
|
+
class types_row extends Struct {
|
|
611
|
+
id: UInt64;
|
|
612
|
+
entity_summary_type: entity_summary;
|
|
613
|
+
game_config_type: game_config;
|
|
614
|
+
stratum_remaining_type: stratum_remaining;
|
|
615
|
+
}
|
|
616
|
+
class undeploy extends Struct {
|
|
617
|
+
host_id: UInt64;
|
|
618
|
+
target_id: UInt64;
|
|
619
|
+
}
|
|
620
|
+
class warp extends Struct {
|
|
621
|
+
id: UInt64;
|
|
622
|
+
x: Int64;
|
|
623
|
+
y: Int64;
|
|
624
|
+
}
|
|
625
|
+
class wipe extends Struct {
|
|
626
|
+
}
|
|
627
|
+
class wrap extends Struct {
|
|
628
|
+
owner: Name;
|
|
629
|
+
entity_id: UInt64;
|
|
630
|
+
nexus_id: UInt64;
|
|
631
|
+
items: cargo_item[];
|
|
632
|
+
}
|
|
633
|
+
class wrapentity extends Struct {
|
|
634
|
+
entity_id: UInt64;
|
|
635
|
+
nexus_id: UInt64;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
type CoordinatesType = Coordinates | Types.coordinates | {
|
|
640
|
+
x: Int64Type;
|
|
641
|
+
y: Int64Type;
|
|
642
|
+
};
|
|
643
|
+
declare class Coordinates extends Types.coordinates {
|
|
644
|
+
static from(value: CoordinatesType): Coordinates;
|
|
645
|
+
equals(other: CoordinatesType): boolean;
|
|
646
|
+
toLocationId(): UInt64;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
interface EntityCapabilities {
|
|
650
|
+
hullmass?: UInt32;
|
|
651
|
+
capacity?: UInt32;
|
|
652
|
+
engines?: Types.movement_stats;
|
|
653
|
+
generator?: Types.energy_stats;
|
|
654
|
+
loaders?: Types.loader_stats;
|
|
655
|
+
gatherer?: Types.gatherer_stats;
|
|
656
|
+
crafter?: Types.crafter_stats;
|
|
657
|
+
hauler?: Types.hauler_stats;
|
|
658
|
+
}
|
|
659
|
+
interface EntityState {
|
|
660
|
+
owner: Name;
|
|
661
|
+
location: Types.coordinates;
|
|
662
|
+
energy?: UInt16;
|
|
663
|
+
cargomass: UInt32;
|
|
664
|
+
cargo: Types.cargo_item[];
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
interface CargoStack {
|
|
668
|
+
item_id: UInt16;
|
|
669
|
+
quantity: UInt32;
|
|
670
|
+
stats: UInt64;
|
|
671
|
+
modules: Types.module_entry[];
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
interface ProjectedEntity {
|
|
675
|
+
location: Coordinates;
|
|
676
|
+
energy: UInt16;
|
|
677
|
+
cargo: CargoStack[];
|
|
678
|
+
shipMass: UInt32;
|
|
679
|
+
capacity?: UInt64;
|
|
680
|
+
engines?: Types.movement_stats;
|
|
681
|
+
loaders?: Types.loader_stats;
|
|
682
|
+
generator?: Types.energy_stats;
|
|
683
|
+
hauler?: Types.hauler_stats;
|
|
684
|
+
readonly cargoMass: UInt64;
|
|
685
|
+
readonly totalMass: UInt64;
|
|
686
|
+
hasMovement(): boolean;
|
|
687
|
+
hasStorage(): boolean;
|
|
688
|
+
hasLoaders(): boolean;
|
|
689
|
+
capabilities(): EntityCapabilities;
|
|
690
|
+
state(): EntityState;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
interface ContractProjectedState {
|
|
694
|
+
owner: {
|
|
695
|
+
toString(): string;
|
|
696
|
+
};
|
|
697
|
+
coordinates: Types.coordinates;
|
|
698
|
+
energy?: UInt16;
|
|
699
|
+
cargomass: UInt32;
|
|
700
|
+
cargo: Types.cargo_view[];
|
|
701
|
+
hullmass?: UInt32;
|
|
702
|
+
capacity?: UInt32;
|
|
703
|
+
engines?: Types.movement_stats;
|
|
704
|
+
loaders?: Types.loader_stats;
|
|
705
|
+
generator?: Types.energy_stats;
|
|
706
|
+
hauler?: Types.hauler_stats;
|
|
707
|
+
}
|
|
708
|
+
interface ProjectionComparisonOptions {
|
|
709
|
+
step?: number;
|
|
710
|
+
}
|
|
711
|
+
declare function assertProjectionEquals(contract: ContractProjectedState, sdk: ProjectedEntity, options?: ProjectionComparisonOptions): void;
|
|
712
|
+
|
|
713
|
+
export { CATALOG_FILES_REL, ContractProjectedState, ProjectionComparisonOptions, assertProjectionEquals, computeCatalogHash };
|