# crafting
Documentation: next (source: develop).

Install the preview: `pnpm add @aephia/atlas-kit@next`. These docs follow develop and may include changes not yet published to npm.

Markdown source of https://develop.atlas-kit-docs.pages.dev/reference/crafting/ — see https://develop.atlas-kit-docs.pages.dev/ai/ for the full machine-readable surface.

## Interfaces

<a id="craftingcargoinventory"></a>

### CraftingCargoInventory

Defined in: [packages/sage/src/crafting/index.ts:79](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L79)

A registry-resolved nested crafting CargoPod.

#### Example

```ts
declare const inventory: CraftingCargoInventory;
console.log(inventory.items);
```

#### Properties

<a id="items"></a>

##### items

```ts
readonly items: readonly CraftingCargoItem[];
```

Defined in: [packages/sage/src/crafting/index.ts:82](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L82)

<a id="sequenceid"></a>

##### sequenceId

```ts
readonly sequenceId: number;
```

Defined in: [packages/sage/src/crafting/index.ts:80](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L80)

<a id="usedstorageunitsraw"></a>

##### usedStorageUnitsRaw

```ts
readonly usedStorageUnitsRaw: bigint;
```

Defined in: [packages/sage/src/crafting/index.ts:81](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L81)

***

<a id="craftingcargoitem"></a>

### CraftingCargoItem

Defined in: [packages/sage/src/crafting/index.ts:68](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L68)

A registry-resolved cargo amount used by a Recipe or Crafting Process.

#### Example

```ts
declare const item: CraftingCargoItem;
console.log(item.name, item.quantityRaw);
```

#### Extends

- [`CargoDefinitionSummary`](/reference/#cargodefinitionsummary)

#### Properties

<a id="categoryid"></a>

##### categoryId

```ts
readonly categoryId: number;
```

Defined in: [packages/sage/src/registry/index.ts:119](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/registry/index.ts#L119)

###### Inherited from

[`CargoDefinitionSummary`](/reference/#cargodefinitionsummary).[`categoryId`](/reference/#cargodefinitionsummary)

<a id="id"></a>

##### id

```ts
readonly id: number;
```

Defined in: [packages/sage/src/registry/index.ts:120](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/registry/index.ts#L120)

###### Inherited from

[`CargoDefinitionSummary`](/reference/#cargodefinitionsummary).[`id`](/reference/#cargodefinitionsummary)

<a id="mint"></a>

##### mint

```ts
readonly mint: Address;
```

Defined in: [packages/sage/src/registry/index.ts:121](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/registry/index.ts#L121)

###### Inherited from

[`CargoDefinitionSummary`](/reference/#cargodefinitionsummary).[`mint`](/reference/#cargodefinitionsummary)

<a id="name"></a>

##### name

```ts
readonly name: string;
```

Defined in: [packages/sage/src/registry/index.ts:122](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/registry/index.ts#L122)

###### Inherited from

[`CargoDefinitionSummary`](/reference/#cargodefinitionsummary).[`name`](/reference/#cargodefinitionsummary)

<a id="quantityraw"></a>

##### quantityRaw

```ts
readonly quantityRaw: bigint;
```

Defined in: [packages/sage/src/crafting/index.ts:69](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L69)

<a id="storagecost"></a>

##### storageCost

```ts
readonly storageCost: number;
```

Defined in: [packages/sage/src/registry/index.ts:127](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/registry/index.ts#L127)

Encoded storage cost with 8 fractional bits: 256 means one whole storage unit.
For a nonnegative bigint quantity, use `(quantity * BigInt(storageCost) + 255n) / 256n`.
Round each transfer row up before summing; Fleet capacities and pod usage are whole units.

###### Inherited from

[`CargoDefinitionSummary`](/reference/#cargodefinitionsummary).[`storageCost`](/reference/#cargodefinitionsummary)

***

<a id="craftingdefinitioncargoitem"></a>

### CraftingDefinitionCargoItem

Defined in: [packages/sage/src/crafting/index.ts:193](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L193)

One resolved cargo quantity used by a Hab building definition.

#### Example

```ts
declare const item: CraftingDefinitionCargoItem;
console.log(item.quantityRaw);
```

#### Extends

- [`CargoDefinitionSummary`](/reference/#cargodefinitionsummary)

#### Properties

<a id="categoryid-1"></a>

##### categoryId

```ts
readonly categoryId: number;
```

Defined in: [packages/sage/src/registry/index.ts:119](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/registry/index.ts#L119)

###### Inherited from

[`CargoDefinitionSummary`](/reference/#cargodefinitionsummary).[`categoryId`](/reference/#cargodefinitionsummary)

<a id="id-1"></a>

##### id

```ts
readonly id: number;
```

Defined in: [packages/sage/src/registry/index.ts:120](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/registry/index.ts#L120)

###### Inherited from

[`CargoDefinitionSummary`](/reference/#cargodefinitionsummary).[`id`](/reference/#cargodefinitionsummary)

<a id="mint-1"></a>

##### mint

```ts
readonly mint: Address;
```

Defined in: [packages/sage/src/registry/index.ts:121](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/registry/index.ts#L121)

###### Inherited from

[`CargoDefinitionSummary`](/reference/#cargodefinitionsummary).[`mint`](/reference/#cargodefinitionsummary)

<a id="name-1"></a>

##### name

```ts
readonly name: string;
```

Defined in: [packages/sage/src/registry/index.ts:122](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/registry/index.ts#L122)

###### Inherited from

[`CargoDefinitionSummary`](/reference/#cargodefinitionsummary).[`name`](/reference/#cargodefinitionsummary)

<a id="quantityraw-1"></a>

##### quantityRaw

```ts
readonly quantityRaw: bigint;
```

Defined in: [packages/sage/src/crafting/index.ts:194](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L194)

<a id="storagecost-1"></a>

##### storageCost

```ts
readonly storageCost: number;
```

Defined in: [packages/sage/src/registry/index.ts:127](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/registry/index.ts#L127)

Encoded storage cost with 8 fractional bits: 256 means one whole storage unit.
For a nonnegative bigint quantity, use `(quantity * BigInt(storageCost) + 255n) / 256n`.
Round each transfer row up before summing; Fleet capacities and pod usage are whole units.

###### Inherited from

[`CargoDefinitionSummary`](/reference/#cargodefinitionsummary).[`storageCost`](/reference/#cargodefinitionsummary)

***

<a id="craftinghabbuilding"></a>

### CraftingHabBuilding

Defined in: [packages/sage/src/crafting/index.ts:204](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L204)

A resolved Crafting Hab building definition and placed quantity.

#### Example

```ts
declare const building: CraftingHabBuilding;
console.log(building.definition.name, building.quantity);
```

#### Properties

<a id="definition"></a>

##### definition

```ts
readonly definition: {
  constructionCost: readonly CraftingDefinitionCargoItem[];
  constructionDurationSeconds: bigint;
  crewSlots: number;
  hubValue: number;
  id: number;
  jobCapacity: number;
  minimumTier: "one" | "two" | "three" | "four" | "five";
  modifiers: CraftingModifierData;
  name: string;
  neededCrew: number;
  netRates: readonly CargoDefinitionSummary & {
     unitsPerSecond: number;
     unitsPerSecondRaw: bigint;
  }[];
  providedTagIds: readonly number[];
  refunds: readonly CraftingDefinitionCargoItem[];
  requiredTagIds: readonly number[];
  researchRequirementIds: readonly number[];
  resourceCapacityRaw: bigint;
  slots: number;
  unlockedRecipes: readonly EntityRef<"recipe">[];
  xpValue: {
     raw: bigint;
     value: number;
  };
};
```

Defined in: [packages/sage/src/crafting/index.ts:206](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L206)

###### constructionCost

```ts
readonly constructionCost: readonly CraftingDefinitionCargoItem[];
```

###### constructionDurationSeconds

```ts
readonly constructionDurationSeconds: bigint;
```

###### crewSlots

```ts
readonly crewSlots: number;
```

###### hubValue

```ts
readonly hubValue: number;
```

###### id

```ts
readonly id: number;
```

###### jobCapacity

```ts
readonly jobCapacity: number;
```

###### minimumTier

```ts
readonly minimumTier: "one" | "two" | "three" | "four" | "five";
```

###### modifiers

```ts
readonly modifiers: CraftingModifierData;
```

###### name

```ts
readonly name: string;
```

###### neededCrew

```ts
readonly neededCrew: number;
```

###### netRates

```ts
readonly netRates: readonly CargoDefinitionSummary & {
  unitsPerSecond: number;
  unitsPerSecondRaw: bigint;
}[];
```

###### providedTagIds

```ts
readonly providedTagIds: readonly number[];
```

###### refunds

```ts
readonly refunds: readonly CraftingDefinitionCargoItem[];
```

###### requiredTagIds

```ts
readonly requiredTagIds: readonly number[];
```

###### researchRequirementIds

```ts
readonly researchRequirementIds: readonly number[];
```

###### resourceCapacityRaw

```ts
readonly resourceCapacityRaw: bigint;
```

###### slots

```ts
readonly slots: number;
```

###### unlockedRecipes

```ts
readonly unlockedRecipes: readonly EntityRef<"recipe">[];
```

###### xpValue

```ts
readonly xpValue: {
  raw: bigint;
  value: number;
};
```

###### xpValue.raw

```ts
readonly raw: bigint;
```

###### xpValue.value

```ts
readonly value: number;
```

<a id="quantity"></a>

##### quantity

```ts
readonly quantity: number;
```

Defined in: [packages/sage/src/crafting/index.ts:205](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L205)

***

<a id="craftinghabdefinitionsummary"></a>

### CraftingHabDefinitionSummary

Defined in: [packages/sage/src/crafting/index.ts:168](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L168)

A resolved Crafting Hab definition from the Game registry.

#### Example

```ts
declare const definition: CraftingHabDefinitionSummary;
console.log(definition.name, definition.placementCargo.name);
```

#### Properties

<a id="evictiongraceperiodseconds"></a>

##### evictionGracePeriodSeconds

```ts
readonly evictionGracePeriodSeconds: bigint;
```

Defined in: [packages/sage/src/crafting/index.ts:181](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L181)

<a id="hubvalue"></a>

##### hubValue

```ts
readonly hubValue: number;
```

Defined in: [packages/sage/src/crafting/index.ts:178](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L178)

<a id="id-2"></a>

##### id

```ts
readonly id: number;
```

Defined in: [packages/sage/src/crafting/index.ts:169](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L169)

<a id="name-2"></a>

##### name

```ts
readonly name: string;
```

Defined in: [packages/sage/src/crafting/index.ts:170](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L170)

<a id="placementcargo"></a>

##### placementCargo

```ts
readonly placementCargo: CargoDefinitionSummary;
```

Defined in: [packages/sage/src/crafting/index.ts:183](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L183)

<a id="placementfeemultiplier"></a>

##### placementFeeMultiplier

```ts
readonly placementFeeMultiplier: {
  raw: bigint;
  value: number;
};
```

Defined in: [packages/sage/src/crafting/index.ts:174](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L174)

###### raw

```ts
readonly raw: bigint;
```

###### value

```ts
readonly value: number;
```

<a id="providedtagids"></a>

##### providedTagIds

```ts
readonly providedTagIds: readonly number[];
```

Defined in: [packages/sage/src/crafting/index.ts:180](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L180)

<a id="rentmultiplier"></a>

##### rentMultiplier

```ts
readonly rentMultiplier: {
  raw: bigint;
  value: number;
};
```

Defined in: [packages/sage/src/crafting/index.ts:173](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L173)

###### raw

```ts
readonly raw: bigint;
```

###### value

```ts
readonly value: number;
```

<a id="requiredtagids"></a>

##### requiredTagIds

```ts
readonly requiredTagIds: readonly number[];
```

Defined in: [packages/sage/src/crafting/index.ts:179](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L179)

<a id="respawndurationseconds"></a>

##### respawnDurationSeconds

```ts
readonly respawnDurationSeconds: bigint;
```

Defined in: [packages/sage/src/crafting/index.ts:182](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L182)

<a id="slots"></a>

##### slots

```ts
readonly slots: number;
```

Defined in: [packages/sage/src/crafting/index.ts:172](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L172)

<a id="tier"></a>

##### tier

```ts
readonly tier: "one" | "two" | "three" | "four" | "five";
```

Defined in: [packages/sage/src/crafting/index.ts:171](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L171)

***

<a id="craftinghabsnapshot"></a>

### CraftingHabSnapshot

Defined in: [packages/sage/src/crafting/index.ts:239](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L239)

Immutable translated Crafting Hab infrastructure and production state.

#### Example

```ts
declare const hab: CraftingHabSnapshot;
console.log(hab.definition.name, hab.production.inventory.items);
```

#### Extends

- `Omit`\<`CraftingHabAccountData`, 
  \| `"buildings"`
  \| `"game"`
  \| `"ownerProfile"`
  \| `"production"`
  \| `"system"`
  \| `"unlockedRecipeIds"`\>

#### Extended by

- [`CraftingHabView`](/reference/#craftinghabview)

#### Properties

<a id="address"></a>

##### address

```ts
readonly address: Address;
```

Defined in: [packages/sage/src/crafting/index.ts:249](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L249)

<a id="availablejobslots"></a>

##### availableJobSlots

```ts
readonly availableJobSlots: number;
```

Defined in: [packages/sage/src/crafting/index.ts:255](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L255)

<a id="buildingdefinitionsequenceid"></a>

##### buildingDefinitionSequenceId

```ts
readonly buildingDefinitionSequenceId: number;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:165](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L165)

###### Inherited from

```ts
Omit.buildingDefinitionSequenceId
```

<a id="buildings"></a>

##### buildings

```ts
readonly buildings: readonly CraftingHabBuilding[];
```

Defined in: [packages/sage/src/crafting/index.ts:254](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L254)

<a id="constructionprogressatunixseconds"></a>

##### constructionProgressAtUnixSeconds

```ts
readonly constructionProgressAtUnixSeconds: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:169](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L169)

###### Inherited from

```ts
Omit.constructionProgressAtUnixSeconds
```

<a id="constructionremainingseconds"></a>

##### constructionRemainingSeconds

```ts
readonly constructionRemainingSeconds: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:168](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L168)

###### Inherited from

```ts
Omit.constructionRemainingSeconds
```

<a id="definition-1"></a>

##### definition

```ts
readonly definition: CraftingHabDefinitionSummary;
```

Defined in: [packages/sage/src/crafting/index.ts:253](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L253)

<a id="definitionid"></a>

##### definitionId

```ts
readonly definitionId: number;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:163](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L163)

###### Inherited from

```ts
Omit.definitionId
```

<a id="definitionsequenceid"></a>

##### definitionSequenceId

```ts
readonly definitionSequenceId: number;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:164](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L164)

###### Inherited from

```ts
Omit.definitionSequenceId
```

<a id="game"></a>

##### game

```ts
readonly game: EntityRef<"game">;
```

Defined in: [packages/sage/src/crafting/index.ts:250](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L250)

<a id="jobcapacity"></a>

##### jobCapacity

```ts
readonly jobCapacity: number;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:174](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L174)

###### Inherited from

```ts
Omit.jobCapacity
```

<a id="jobsrunning"></a>

##### jobsRunning

```ts
readonly jobsRunning: number;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:175](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L175)

###### Inherited from

```ts
Omit.jobsRunning
```

<a id="kind"></a>

##### kind

```ts
readonly kind: "craftingHabInstance";
```

Defined in: [packages/sage/src/crafting/index.ts:248](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L248)

<a id="lastrentatunixseconds"></a>

##### lastRentAtUnixSeconds

```ts
readonly lastRentAtUnixSeconds: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:167](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L167)

###### Inherited from

```ts
Omit.lastRentAtUnixSeconds
```

<a id="modifiers"></a>

##### modifiers

```ts
readonly modifiers: CraftingModifierData;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:176](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L176)

###### Inherited from

```ts
Omit.modifiers
```

<a id="neededcrew"></a>

##### neededCrew

```ts
readonly neededCrew: number;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:173](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L173)

Crew the Hab reserved, on a version-1 instance. A version-0 instance
stores an unverified nominal value instead.

###### Inherited from

```ts
Omit.neededCrew
```

<a id="ownerprofile"></a>

##### ownerProfile

```ts
readonly ownerProfile: EntityRef<"profile">;
```

Defined in: [packages/sage/src/crafting/index.ts:251](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L251)

<a id="production"></a>

##### production

```ts
readonly production: {
  inventory: CraftingCargoInventory;
  lastTickAtUnixSeconds: bigint;
  netRates: readonly CargoDefinitionSummary & {
     unitsPerSecond: number;
     unitsPerSecondRaw: bigint;
  }[];
  resourceCapacityRaw: bigint;
};
```

Defined in: [packages/sage/src/crafting/index.ts:257](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L257)

###### inventory

```ts
readonly inventory: CraftingCargoInventory;
```

###### lastTickAtUnixSeconds

```ts
readonly lastTickAtUnixSeconds: bigint;
```

###### netRates

```ts
readonly netRates: readonly CargoDefinitionSummary & {
  unitsPerSecond: number;
  unitsPerSecondRaw: bigint;
}[];
```

###### resourceCapacityRaw

```ts
readonly resourceCapacityRaw: bigint;
```

<a id="rentbalanceraw"></a>

##### rentBalanceRaw

```ts
readonly rentBalanceRaw: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:170](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L170)

###### Inherited from

```ts
Omit.rentBalanceRaw
```

<a id="state"></a>

##### state

```ts
readonly state: CraftingHabStateData;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:179](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L179)

###### Inherited from

```ts
Omit.state
```

<a id="system"></a>

##### system

```ts
readonly system: EntityRef<"starSystem">;
```

Defined in: [packages/sage/src/crafting/index.ts:252](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L252)

<a id="systemsequenceid"></a>

##### systemSequenceId

```ts
readonly systemSequenceId: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:166](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L166)

###### Inherited from

```ts
Omit.systemSequenceId
```

<a id="unlockedrecipes"></a>

##### unlockedRecipes

```ts
readonly unlockedRecipes: readonly EntityRef<"recipe">[];
```

Defined in: [packages/sage/src/crafting/index.ts:256](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L256)

<a id="version"></a>

##### version

```ts
readonly version: number;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:159](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L159)

###### Inherited from

```ts
Omit.version
```

#### Methods

<a id="tojson"></a>

##### toJSON()

```ts
toJSON(): unknown;
```

Defined in: [packages/sage/src/crafting/index.ts:266](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L266)

###### Returns

`unknown`

***

<a id="craftingprocesssnapshot"></a>

### CraftingProcessSnapshot

Defined in: [packages/sage/src/crafting/index.ts:276](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L276)

Immutable translated Crafting Process with resolved Recipe and inputs.

#### Example

```ts
declare const process: CraftingProcessSnapshot;
console.log(process.recipe.name, process.numCrew);
```

#### Extends

- `Omit`\<`CraftingProcessAccountData`, 
  \| `"craftingHab"`
  \| `"inputs"`
  \| `"profile"`
  \| `"recipe"`
  \| `"starbasePlayer"`
  \| `"system"`\>

#### Extended by

- [`CraftingProcessView`](/reference/#craftingprocessview)

#### Properties

<a id="address-1"></a>

##### address

```ts
readonly address: Address;
```

Defined in: [packages/sage/src/crafting/index.ts:281](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L281)

<a id="craftinghab"></a>

##### craftingHab?

```ts
readonly optional craftingHab?: EntityRef<"craftingHabInstance">;
```

Defined in: [packages/sage/src/crafting/index.ts:287](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L287)

The Process Hab, or absent when crafting without a Hab.

<a id="endsatunixseconds"></a>

##### endsAtUnixSeconds

```ts
readonly endsAtUnixSeconds: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:199](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L199)

###### Inherited from

```ts
Omit.endsAtUnixSeconds
```

<a id="feeescrowatlas"></a>

##### feeEscrowAtlas

```ts
readonly feeEscrowAtlas: number;
```

Defined in: [packages/sage/src/crafting/index.ts:289](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L289)

<a id="feeescrowraw"></a>

##### feeEscrowRaw

```ts
readonly feeEscrowRaw: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:200](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L200)

###### Inherited from

```ts
Omit.feeEscrowRaw
```

<a id="feegovernance"></a>

##### feeGovernance?

```ts
readonly optional feeGovernance?: Address;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:204](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L204)

Captured governance address, if present; never inferred from the current Recipe.

###### Inherited from

```ts
Omit.feeGovernance
```

<a id="feerecipient"></a>

##### feeRecipient?

```ts
readonly optional feeRecipient?: "atlas" | "dao-atlas";
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:202](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L202)

Captured original recipe destination; absent on legacy version 0 processes.

###### Inherited from

```ts
Omit.feeRecipient
```

<a id="feesnapshot"></a>

##### feeSnapshot?

```ts
readonly optional feeSnapshot?: {
  craftingFeeBasisPoints: number;
  localMarketFeeBasisPoints: number;
  localTreasuryShareBasisPoints: number;
};
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:206](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L206)

Captured routing rates; absent on legacy version 0 processes.

###### craftingFeeBasisPoints

```ts
readonly craftingFeeBasisPoints: number;
```

###### localMarketFeeBasisPoints

```ts
readonly localMarketFeeBasisPoints: number;
```

###### localTreasuryShareBasisPoints

```ts
readonly localTreasuryShareBasisPoints: number;
```

###### Inherited from

```ts
Omit.feeSnapshot
```

<a id="inputs"></a>

##### inputs

```ts
readonly inputs: CraftingCargoInventory;
```

Defined in: [packages/sage/src/crafting/index.ts:288](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L288)

<a id="kind-1"></a>

##### kind

```ts
readonly kind: "craftingProcess";
```

Defined in: [packages/sage/src/crafting/index.ts:280](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L280)

<a id="numcrew"></a>

##### numCrew

```ts
readonly numCrew: number;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:197](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L197)

###### Inherited from

```ts
Omit.numCrew
```

<a id="profile"></a>

##### profile

```ts
readonly profile: EntityRef<"profile">;
```

Defined in: [packages/sage/src/crafting/index.ts:283](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L283)

<a id="quantityraw-2"></a>

##### quantityRaw

```ts
readonly quantityRaw: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:196](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L196)

###### Inherited from

```ts
Omit.quantityRaw
```

<a id="recipe"></a>

##### recipe

```ts
readonly recipe: RecipeSnapshot;
```

Defined in: [packages/sage/src/crafting/index.ts:282](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L282)

<a id="starbaseplayer"></a>

##### starbasePlayer

```ts
readonly starbasePlayer: EntityRef<"starbasePlayer">;
```

Defined in: [packages/sage/src/crafting/index.ts:285](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L285)

<a id="starbasesequenceid"></a>

##### starbaseSequenceId

```ts
readonly starbaseSequenceId: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:194](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L194)

###### Inherited from

```ts
Omit.starbaseSequenceId
```

<a id="startsatunixseconds"></a>

##### startsAtUnixSeconds

```ts
readonly startsAtUnixSeconds: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:198](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L198)

###### Inherited from

```ts
Omit.startsAtUnixSeconds
```

<a id="system-1"></a>

##### system

```ts
readonly system: EntityRef<"starSystem">;
```

Defined in: [packages/sage/src/crafting/index.ts:284](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L284)

<a id="version-1"></a>

##### version

```ts
readonly version: number;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:189](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L189)

###### Inherited from

```ts
Omit.version
```

#### Methods

<a id="tojson-1"></a>

##### toJSON()

```ts
toJSON(): unknown;
```

Defined in: [packages/sage/src/crafting/index.ts:290](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L290)

###### Returns

`unknown`

***

<a id="recipesnapshot"></a>

### RecipeSnapshot

Defined in: [packages/sage/src/crafting/index.ts:99](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L99)

Immutable translated Recipe definition.

`usageCountRaw` and `usageLimitRaw` are the stored u64 counters: how many
Crafting Processes have been started from the Recipe and its maximum. A
start consumes one use whatever its quantity, and is possible only while the
count is below the limit, so a stored limit of `0n` is never usable. Every
Recipe observed on z.ink PTR stores `9007199254740991` (2^53 - 1) as its
limit; see `docs/evidence/crafting-zero-usage-limit.md`.

#### Example

```ts
declare const recipe: RecipeSnapshot;
console.log(recipe.ingredients, recipe.outputs);
```

#### Extends

- `Omit`\<`RecipeAccountData`, `"game"` \| `"id"` \| `"inputs"` \| `"outputs"`\>

#### Extended by

- [`RecipeView`](/reference/#recipeview)

#### Properties

<a id="address-2"></a>

##### address

```ts
readonly address: Address;
```

Defined in: [packages/sage/src/crafting/index.ts:104](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L104)

<a id="craftingdurationseconds"></a>

##### craftingDurationSeconds

```ts
readonly craftingDurationSeconds: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:103](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L103)

###### Inherited from

```ts
Omit.craftingDurationSeconds
```

<a id="fee"></a>

##### fee

```ts
readonly fee: {
  amountAtlas: number;
  amountRaw: bigint;
  recipient: "atlas" | "dao-atlas";
};
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:107](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L107)

###### amountAtlas

```ts
readonly amountAtlas: number;
```

###### amountRaw

```ts
readonly amountRaw: bigint;
```

###### recipient

```ts
readonly recipient: "atlas" | "dao-atlas";
```

###### Inherited from

```ts
Omit.fee
```

<a id="game-1"></a>

##### game

```ts
readonly game: EntityRef<"game">;
```

Defined in: [packages/sage/src/crafting/index.ts:105](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L105)

<a id="habrequired"></a>

##### habRequired

```ts
readonly habRequired: boolean;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:112](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L112)

###### Inherited from

```ts
Omit.habRequired
```

<a id="id-3"></a>

##### id

```ts
readonly id: number;
```

Defined in: [packages/sage/src/crafting/index.ts:106](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L106)

<a id="ingredients"></a>

##### ingredients

```ts
readonly ingredients: readonly CraftingCargoItem[];
```

Defined in: [packages/sage/src/crafting/index.ts:107](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L107)

<a id="kind-2"></a>

##### kind

```ts
readonly kind: "recipe";
```

Defined in: [packages/sage/src/crafting/index.ts:103](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L103)

<a id="minimumdurationseconds"></a>

##### minimumDurationSeconds

```ts
readonly minimumDurationSeconds: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:104](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L104)

###### Inherited from

```ts
Omit.minimumDurationSeconds
```

<a id="minimumstarbaselevel"></a>

##### minimumStarbaseLevel

```ts
readonly minimumStarbaseLevel: 
  | "level-0"
  | "level-1"
  | "level-2"
  | "level-3"
  | "level-4"
  | "level-5"
  | "css";
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:116](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L116)

###### Inherited from

```ts
Omit.minimumStarbaseLevel
```

<a id="modifierbounds"></a>

##### modifierBounds

```ts
readonly modifierBounds: {
  crewCount: CraftingModifierBoundsData;
  efficiency: CraftingModifierBoundsData;
  fee: CraftingModifierBoundsData;
  speed: CraftingModifierBoundsData;
};
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:124](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L124)

###### crewCount

```ts
readonly crewCount: CraftingModifierBoundsData;
```

###### efficiency

```ts
readonly efficiency: CraftingModifierBoundsData;
```

###### fee

```ts
readonly fee: CraftingModifierBoundsData;
```

###### speed

```ts
readonly speed: CraftingModifierBoundsData;
```

###### Inherited from

```ts
Omit.modifierBounds
```

<a id="name-3"></a>

##### name

```ts
readonly name: string;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:105](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L105)

###### Inherited from

```ts
Omit.name
```

<a id="outputs"></a>

##### outputs

```ts
readonly outputs: readonly CraftingCargoItem[];
```

Defined in: [packages/sage/src/crafting/index.ts:108](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L108)

<a id="researchrequirementids"></a>

##### researchRequirementIds

```ts
readonly researchRequirementIds: readonly number[];
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:130](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L130)

###### Inherited from

```ts
Omit.researchRequirementIds
```

<a id="status"></a>

##### status

```ts
readonly status: "active" | "deactivated";
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:106](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L106)

###### Inherited from

```ts
Omit.status
```

<a id="usagecountraw"></a>

##### usageCountRaw

```ts
readonly usageCountRaw: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:113](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L113)

###### Inherited from

```ts
Omit.usageCountRaw
```

<a id="usagelimitraw"></a>

##### usageLimitRaw

```ts
readonly usageLimitRaw: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:114](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L114)

###### Inherited from

```ts
Omit.usageLimitRaw
```

<a id="version-2"></a>

##### version

```ts
readonly version: number;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:100](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L100)

###### Inherited from

```ts
Omit.version
```

<a id="xpvalueraw"></a>

##### xpValueRaw

```ts
readonly xpValueRaw: bigint;
```

Defined in: [packages/sage/src/internal/c4/crafting.ts:115](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/internal/c4/crafting.ts#L115)

###### Inherited from

```ts
Omit.xpValueRaw
```

#### Methods

<a id="tojson-2"></a>

##### toJSON()

```ts
toJSON(): unknown;
```

Defined in: [packages/sage/src/crafting/index.ts:109](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L109)

###### Returns

`unknown`

## Type Aliases

<a id="craftingdiscoveryoptions"></a>

### CraftingDiscoveryOptions

```ts
type CraftingDiscoveryOptions = Omit<DiscoveryRequest, "filters" | "strategy">;
```

Defined in: [packages/sage/src/crafting/index.ts:56](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L56)

Options supported by targeted crafting discovery.

#### Example

```ts
const options: CraftingDiscoveryOptions = { commitment: 'confirmed' };
```

***

<a id="craftinghabdefinition"></a>

### CraftingHabDefinition

```ts
type CraftingHabDefinition = GameCraftingHabDefinitionData;
```

Defined in: [packages/sage/src/crafting/index.ts:126](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L126)

Immutable Crafting Hab container definition from the loaded Game catalog.

Unlike a placed Hab's `CraftingHabDefinitionSummary`, this independent
definition keeps its placement `cargoId` without resolving cargo. Multipliers
retain dimensionless exact raw bigint and ergonomic values. Global eviction
and respawn durations remain exact seconds. JSON serializes bigint as decimal
strings; the loaded catalog does not assert current chain freshness.

#### Example

```ts
declare const definition: CraftingHabDefinition;
console.log(definition.name, definition.cargoId, definition.rentMultiplier.raw);
```

***

<a id="craftingprocessstate"></a>

### CraftingProcessState

```ts
type CraftingProcessState = 
  | {
  kind: "scheduled";
}
  | {
  kind: "in-progress";
  remainingSeconds: bigint;
}
  | {
  kind: "complete";
};
```

Defined in: [packages/sage/src/crafting/index.ts:299](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L299)

Pure lifecycle projection for one Crafting Process at a given Unix time.

#### Example

```ts
const state: CraftingProcessState = { kind: 'scheduled' };
```

***

<a id="habbuildingdefinition"></a>

### HabBuildingDefinition

```ts
type HabBuildingDefinition = GameHabBuildingDefinitionData;
```

Defined in: [packages/sage/src/crafting/index.ts:1030](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L1030)

Immutable Hab building definition from the loaded Game catalog.
Keeps the existing Hab-specific modifiers, job capacity and unlocked recipes;
this is configuration, not the output of a placed building. Fixed-point values
retain exact raw bigint, and JSON serializes bigint as decimal strings.

#### Example

```ts
declare const definition: HabBuildingDefinition;
console.log(definition.modifiers.speed.value, definition.unlockedRecipeIds);
```

## Functions

<a id="derivecraftingprocessstate"></a>

### deriveCraftingProcessState()

```ts
function deriveCraftingProcessState(process, atUnixSeconds): CraftingProcessState;
```

Defined in: [packages/sage/src/crafting/index.ts:1010](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L1010)

Derives the scheduled, active, or complete state at a Unix timestamp.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `process` | `Pick`\<[`CraftingProcessSnapshot`](/reference/crafting/#craftingprocesssnapshot), `"startsAtUnixSeconds"` \| `"endsAtUnixSeconds"`\> |
| `atUnixSeconds` | `bigint` |

#### Returns

[`CraftingProcessState`](/reference/crafting/#craftingprocessstate)

#### Example

```ts
declare const process: CraftingProcessSnapshot;
const state = deriveCraftingProcessState(process, 1_700_000_000n);
```

***

<a id="getcraftinghab"></a>

### getCraftingHab()

```ts
function getCraftingHab(
   context, 
   address, 
options?): Promise<CraftingHabSnapshot>;
```

Defined in: [packages/sage/src/crafting/index.ts:783](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L783)

Reads a required Crafting Hab by its signer-created account address.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `address` | [`Address`](/reference/#address-20) |
| `options?` | [`ReadOptions`](/reference/client/#readoptions) |

#### Returns

`Promise`\<[`CraftingHabSnapshot`](/reference/crafting/#craftinghabsnapshot)\>

#### Example

```ts
declare const ctx: SageContext;
declare const address: Address;
const hab = await getCraftingHab(ctx, address);
```

***

<a id="getcraftinghabdefinition"></a>

### getCraftingHabDefinition()

```ts
function getCraftingHabDefinition(context, id): Promise<GameCraftingHabDefinitionData>;
```

Defined in: [packages/sage/src/crafting/index.ts:137](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L137)

Loads one Crafting Hab container definition by its Game table id.
The catalog loads lazily without fetching a placed Hab or its placement cargo.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `id` | `number` |

#### Returns

`Promise`\<`GameCraftingHabDefinitionData`\>

#### Example

```ts
declare const ctx: SageContext;
const definition = await getCraftingHabDefinition(ctx, 7);
console.log(definition.slots, definition.respawnDurationSeconds);
```

***

<a id="getcraftinghabsbycharacter"></a>

### getCraftingHabsByCharacter()

```ts
function getCraftingHabsByCharacter(
   context, 
   character, 
options?): Promise<readonly CraftingHabSnapshot[]>;
```

Defined in: [packages/sage/src/crafting/index.ts:971](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L971)

Discovers Crafting Habs for the Profile stored by one Character.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `character` | [`Address`](/reference/#address-20) |
| `options?` | [`CraftingDiscoveryOptions`](/reference/crafting/#craftingdiscoveryoptions) |

#### Returns

`Promise`\<readonly [`CraftingHabSnapshot`](/reference/crafting/#craftinghabsnapshot)[]\>

#### Example

```ts
declare const ctx: SageContext;
declare const character: Address;
const habs = await getCraftingHabsByCharacter(ctx, character);
```

***

<a id="getcraftinghabsbyprofile"></a>

### getCraftingHabsByProfile()

```ts
function getCraftingHabsByProfile(
   context, 
   profile, 
options?): Promise<readonly CraftingHabSnapshot[]>;
```

Defined in: [packages/sage/src/crafting/index.ts:870](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L870)

Discovers Crafting Habs owned by one Player Profile.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `profile` | [`Address`](/reference/#address-20) |
| `options?` | [`CraftingDiscoveryOptions`](/reference/crafting/#craftingdiscoveryoptions) |

#### Returns

`Promise`\<readonly [`CraftingHabSnapshot`](/reference/crafting/#craftinghabsnapshot)[]\>

#### Example

```ts
declare const ctx: SageContext;
declare const profile: Address;
const habs = await getCraftingHabsByProfile(ctx, profile);
```

***

<a id="getcraftinghabsbystarbaseplayer"></a>

### getCraftingHabsByStarbasePlayer()

```ts
function getCraftingHabsByStarbasePlayer(
   context, 
   player, 
options?): Promise<readonly CraftingHabSnapshot[]>;
```

Defined in: [packages/sage/src/crafting/index.ts:920](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L920)

Discovers Crafting Habs for the Profile and System stored by a StarbasePlayer.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `player` | [`Address`](/reference/#address-20) |
| `options?` | [`CraftingDiscoveryOptions`](/reference/crafting/#craftingdiscoveryoptions) |

#### Returns

`Promise`\<readonly [`CraftingHabSnapshot`](/reference/crafting/#craftinghabsnapshot)[]\>

#### Example

```ts
declare const ctx: SageContext;
declare const player: Address;
const habs = await getCraftingHabsByStarbasePlayer(ctx, player);
```

***

<a id="getcraftingprocess"></a>

### getCraftingProcess()

```ts
function getCraftingProcess(
   context, 
   address, 
options?): Promise<CraftingProcessSnapshot>;
```

Defined in: [packages/sage/src/crafting/index.ts:825](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L825)

Reads a required Crafting Process by its signer-created account address.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `address` | [`Address`](/reference/#address-20) |
| `options?` | [`ReadOptions`](/reference/client/#readoptions) |

#### Returns

`Promise`\<[`CraftingProcessSnapshot`](/reference/crafting/#craftingprocesssnapshot)\>

#### Example

```ts
declare const ctx: SageContext;
declare const address: Address;
const process = await getCraftingProcess(ctx, address);
```

***

<a id="getcraftingprocessesbycharacter"></a>

### getCraftingProcessesByCharacter()

```ts
function getCraftingProcessesByCharacter(
   context, 
   character, 
options?): Promise<readonly CraftingProcessSnapshot[]>;
```

Defined in: [packages/sage/src/crafting/index.ts:991](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L991)

Discovers Crafting Processes for the Profile stored by one Character.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `character` | [`Address`](/reference/#address-20) |
| `options?` | [`CraftingDiscoveryOptions`](/reference/crafting/#craftingdiscoveryoptions) |

#### Returns

`Promise`\<readonly [`CraftingProcessSnapshot`](/reference/crafting/#craftingprocesssnapshot)[]\>

#### Example

```ts
declare const ctx: SageContext;
declare const character: Address;
const processes = await getCraftingProcessesByCharacter(ctx, character);
```

***

<a id="getcraftingprocessesbyprofile"></a>

### getCraftingProcessesByProfile()

```ts
function getCraftingProcessesByProfile(
   context, 
   profile, 
options?): Promise<readonly CraftingProcessSnapshot[]>;
```

Defined in: [packages/sage/src/crafting/index.ts:896](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L896)

Discovers Crafting Processes belonging to one Player Profile.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `profile` | [`Address`](/reference/#address-20) |
| `options?` | [`CraftingDiscoveryOptions`](/reference/crafting/#craftingdiscoveryoptions) |

#### Returns

`Promise`\<readonly [`CraftingProcessSnapshot`](/reference/crafting/#craftingprocesssnapshot)[]\>

#### Example

```ts
declare const ctx: SageContext;
declare const profile: Address;
const processes = await getCraftingProcessesByProfile(ctx, profile);
```

***

<a id="getcraftingprocessesbystarbaseplayer"></a>

### getCraftingProcessesByStarbasePlayer()

```ts
function getCraftingProcessesByStarbasePlayer(
   context, 
   player, 
options?): Promise<readonly CraftingProcessSnapshot[]>;
```

Defined in: [packages/sage/src/crafting/index.ts:947](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L947)

Discovers Crafting Processes linked to one StarbasePlayer.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `player` | [`Address`](/reference/#address-20) |
| `options?` | [`CraftingDiscoveryOptions`](/reference/crafting/#craftingdiscoveryoptions) |

#### Returns

`Promise`\<readonly [`CraftingProcessSnapshot`](/reference/crafting/#craftingprocesssnapshot)[]\>

#### Example

```ts
declare const ctx: SageContext;
declare const player: Address;
const processes = await getCraftingProcessesByStarbasePlayer(ctx, player);
```

***

<a id="gethabbuildingdefinition"></a>

### getHabBuildingDefinition()

```ts
function getHabBuildingDefinition(context, id): Promise<GameHabBuildingDefinitionData>;
```

Defined in: [packages/sage/src/crafting/index.ts:1041](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L1041)

Loads one Hab building definition without fetching a placed Crafting Hab.
The returned definition reflects the loaded section, not proven-current chain state.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `id` | `number` |

#### Returns

`Promise`\<`GameHabBuildingDefinitionData`\>

#### Example

```ts
declare const ctx: SageContext;
const building = await getHabBuildingDefinition(ctx, 7);
console.log(building.jobCapacity, building.constructionDurationSeconds);
```

***

<a id="getrecipe"></a>

### getRecipe()

```ts
function getRecipe(
   context, 
   address, 
options?): Promise<RecipeSnapshot>;
```

Defined in: [packages/sage/src/crafting/index.ts:719](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L719)

Reads a required Recipe by its derived account address.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `address` | [`Address`](/reference/#address-20) |
| `options?` | [`ReadOptions`](/reference/client/#readoptions) |

#### Returns

`Promise`\<[`RecipeSnapshot`](/reference/crafting/#recipesnapshot)\>

#### Example

```ts
declare const ctx: SageContext;
declare const address: Address;
const recipe = await getRecipe(ctx, address);
```

***

<a id="getrecipebyid"></a>

### getRecipeById()

```ts
function getRecipeById(
   context, 
   recipeId, 
options?): Promise<RecipeSnapshot>;
```

Defined in: [packages/sage/src/crafting/index.ts:762](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L762)

Derives and reads one Recipe from the configured Game and recipe id.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `recipeId` | `number` |
| `options?` | [`ReadOptions`](/reference/client/#readoptions) |

#### Returns

`Promise`\<[`RecipeSnapshot`](/reference/crafting/#recipesnapshot)\>

#### Example

```ts
declare const ctx: SageContext;
const recipe = await getRecipeById(ctx, 7);
```

***

<a id="listcraftinghabdefinitions"></a>

### listCraftingHabDefinitions()

```ts
function listCraftingHabDefinitions(context): Promise<readonly GameCraftingHabDefinitionData[]>;
```

Defined in: [packages/sage/src/crafting/index.ts:155](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L155)

Lists the loaded Crafting Hab containers as immutable canonical definitions.
The array is retained per section generation and shares by-id lookup objects.
Refresh replaces both together; previously returned arrays remain immutable
snapshots. This catalog carries no proof of latest chain state or sort order.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |

#### Returns

`Promise`\<readonly `GameCraftingHabDefinitionData`[]\>

#### Example

```ts
declare const ctx: SageContext;
const definitions = await listCraftingHabDefinitions(ctx);
console.log(definitions.map(definition => definition.name));
```

***

<a id="listhabbuildingdefinitions"></a>

### listHabBuildingDefinitions()

```ts
function listHabBuildingDefinitions(context): Promise<readonly GameHabBuildingDefinitionData[]>;
```

Defined in: [packages/sage/src/crafting/index.ts:1059](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L1059)

Lists the loaded Hab building catalog as immutable canonical definitions.
Shares objects with by-id lookups and retains the array for its section
generation. Refresh replaces both together; older returned arrays remain
immutable snapshots. No sort order or latest-chain freshness is promised.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |

#### Returns

`Promise`\<readonly `GameHabBuildingDefinitionData`[]\>

#### Example

```ts
declare const ctx: SageContext;
const buildings = await listHabBuildingDefinitions(ctx);
console.log(buildings.map(building => building.name));
```

***

<a id="listrecipes"></a>

### listRecipes()

```ts
function listRecipes(context, options?): Promise<readonly RecipeSnapshot[]>;
```

Defined in: [packages/sage/src/crafting/index.ts:688](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L688)

Discovers every Recipe reported for the configured Game, active or deactivated.
Returns frozen snapshots sorted by numeric id; reported failures reject the
entire catalog. Each completed call reconsults discovery (a configured indexer
takes precedence), but cargo definitions may be reused by the context registry.
`no-store` prevents discovered Recipe cache writes, not registry retention.
Recipe commitment applies to discovery and direct candidate validation; cargo
resolution uses the context commitment. Read metadata is provenance, not an
atomic-slot or provider-completeness guarantee.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `options?` | [`CraftingDiscoveryOptions`](/reference/crafting/#craftingdiscoveryoptions) |

#### Returns

`Promise`\<readonly [`RecipeSnapshot`](/reference/crafting/#recipesnapshot)[]\>

#### Example

```ts
declare const ctx: SageContext;
const recipes = await listRecipes(ctx, { policy: 'no-store' });
console.log(recipes.map(recipe => recipe.name));
```

***

<a id="maybegetcraftinghab"></a>

### maybeGetCraftingHab()

```ts
function maybeGetCraftingHab(
   context, 
   address, 
   options?): Promise<
  | CraftingHabSnapshot
| undefined>;
```

Defined in: [packages/sage/src/crafting/index.ts:803](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L803)

Reads an optional Crafting Hab by address.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `address` | [`Address`](/reference/#address-20) |
| `options?` | [`ReadOptions`](/reference/client/#readoptions) |

#### Returns

`Promise`\<
  \| [`CraftingHabSnapshot`](/reference/crafting/#craftinghabsnapshot)
  \| `undefined`\>

#### Example

```ts
declare const ctx: SageContext;
declare const address: Address;
const hab = await maybeGetCraftingHab(ctx, address);
```

***

<a id="maybegetcraftingprocess"></a>

### maybeGetCraftingProcess()

```ts
function maybeGetCraftingProcess(
   context, 
   address, 
   options?): Promise<
  | CraftingProcessSnapshot
| undefined>;
```

Defined in: [packages/sage/src/crafting/index.ts:846](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L846)

Reads an optional Crafting Process by address.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `address` | [`Address`](/reference/#address-20) |
| `options?` | [`ReadOptions`](/reference/client/#readoptions) |

#### Returns

`Promise`\<
  \| [`CraftingProcessSnapshot`](/reference/crafting/#craftingprocesssnapshot)
  \| `undefined`\>

#### Example

```ts
declare const ctx: SageContext;
declare const address: Address;
const process = await maybeGetCraftingProcess(ctx, address);
```

***

<a id="maybegetrecipe"></a>

### maybeGetRecipe()

```ts
function maybeGetRecipe(
   context, 
   address, 
options?): Promise<RecipeSnapshot | undefined>;
```

Defined in: [packages/sage/src/crafting/index.ts:739](https://github.com/Aephia/atlas-kit/blob/develop/packages/sage/src/crafting/index.ts#L739)

Reads an optional Recipe by address.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | [`SageContext`](/reference/#sagecontext) |
| `address` | [`Address`](/reference/#address-20) |
| `options?` | [`ReadOptions`](/reference/client/#readoptions) |

#### Returns

`Promise`\<[`RecipeSnapshot`](/reference/crafting/#recipesnapshot) \| `undefined`\>

#### Example

```ts
declare const ctx: SageContext;
declare const address: Address;
const recipe = await maybeGetRecipe(ctx, address);
```
