@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.
@@ -187,13 +187,15 @@ export class ActionsManager extends BaseManager {
187
187
  owner: NameType,
188
188
  entityId: UInt64Type,
189
189
  nexusId: UInt64Type,
190
- items: ServerContract.ActionParams.Type.cargo_item[]
190
+ cargoId: UInt64Type,
191
+ quantity: UInt64Type
191
192
  ): Action {
192
193
  return this.server.action('wrap', {
193
194
  owner: Name.from(owner),
194
195
  entity_id: UInt64.from(entityId),
195
196
  nexus_id: UInt64.from(nexusId),
196
- items,
197
+ cargo_id: UInt64.from(cargoId),
198
+ quantity: UInt64.from(quantity),
197
199
  })
198
200
  }
199
201
 
@@ -211,6 +213,24 @@ export class ActionsManager extends BaseManager {
211
213
  })
212
214
  }
213
215
 
216
+ deploynft(owner: NameType, assetId: UInt64Type, targetNexusId: UInt64Type): Action {
217
+ const params: ServerContract.ActionParams.deploynft = {
218
+ owner: Name.from(owner),
219
+ asset_id: UInt64.from(assetId),
220
+ target_nexus_id: UInt64.from(targetNexusId),
221
+ }
222
+ return this.server.action('deploynft', params)
223
+ }
224
+
225
+ unwrapnft(owner: NameType, assetId: UInt64Type, hostId: UInt64Type): Action {
226
+ const params: ServerContract.ActionParams.unwrapnft = {
227
+ owner: Name.from(owner),
228
+ asset_id: UInt64.from(assetId),
229
+ host_id: UInt64.from(hostId),
230
+ }
231
+ return this.server.action('unwrapnft', params)
232
+ }
233
+
214
234
  demolish(entityId: UInt64Type): Action {
215
235
  return this.server.action('demolish', {
216
236
  entity_id: UInt64.from(entityId),
@@ -255,7 +255,6 @@ function applyTask(projected: ProjectedEntity, task: ServerContract.Types.task):
255
255
  applyAddCargoTask(projected, task)
256
256
  break
257
257
  case TaskType.UNLOAD:
258
- case TaskType.WRAP:
259
258
  applyRemoveCargoTask(projected, task)
260
259
  break
261
260
  case TaskType.GATHER:
@@ -268,7 +267,6 @@ function applyTask(projected: ProjectedEntity, task: ServerContract.Types.task):
268
267
  applyDeployTask(projected, task)
269
268
  break
270
269
  case TaskType.UNDEPLOY:
271
- case TaskType.WRAP_ENTITY:
272
270
  case TaskType.DEMOLISH:
273
271
  break
274
272
  }
@@ -440,7 +438,6 @@ export function projectEntityAt(entity: Projectable, now: Date): ProjectedEntity
440
438
  if (taskComplete) applyAddCargoTask(projected, task)
441
439
  break
442
440
  case TaskType.UNLOAD:
443
- case TaskType.WRAP:
444
441
  if (taskComplete) applyRemoveCargoTask(projected, task)
445
442
  break
446
443
  case TaskType.GATHER:
@@ -453,7 +450,6 @@ export function projectEntityAt(entity: Projectable, now: Date): ProjectedEntity
453
450
  if (taskComplete) applyDeployTask(projected, task)
454
451
  break
455
452
  case TaskType.UNDEPLOY:
456
- case TaskType.WRAP_ENTITY:
457
453
  case TaskType.DEMOLISH:
458
454
  break
459
455
  }
@@ -34,7 +34,6 @@ export function taskCargoChanges(task: ServerContract.Types.task): TaskCargoChan
34
34
  case TaskType.GATHER:
35
35
  return task.entitytarget ? [] : items.map((i) => toChange(i, 'in'))
36
36
  case TaskType.UNLOAD:
37
- case TaskType.WRAP:
38
37
  return items.map((i) => toChange(i, 'out'))
39
38
  case TaskType.CRAFT:
40
39
  return [
package/src/types.ts CHANGED
@@ -50,10 +50,8 @@ export enum TaskType {
50
50
  WARP = 6,
51
51
  CRAFT = 7,
52
52
  DEPLOY = 8,
53
- WRAP = 9,
54
53
  UNWRAP = 10,
55
54
  UNDEPLOY = 11,
56
- WRAP_ENTITY = 12,
57
55
  DEMOLISH = 13,
58
56
  }
59
57