Skip to content
Next — unreleased

crafting

View as Markdown

Defined in: packages/sage/src/crafting/index.ts:77

A registry-resolved nested crafting CargoPod.

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

readonly items: readonly CraftingCargoItem[];

Defined in: packages/sage/src/crafting/index.ts:80

readonly sequenceId: number;

Defined in: packages/sage/src/crafting/index.ts:78

readonly usedStorageUnitsRaw: bigint;

Defined in: packages/sage/src/crafting/index.ts:79


Defined in: packages/sage/src/crafting/index.ts:66

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

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

readonly categoryId: number;

Defined in: packages/sage/src/registry/index.ts:105

CargoDefinitionSummary.categoryId

readonly id: number;

Defined in: packages/sage/src/registry/index.ts:106

CargoDefinitionSummary.id

readonly mint: Address;

Defined in: packages/sage/src/registry/index.ts:107

CargoDefinitionSummary.mint

readonly name: string;

Defined in: packages/sage/src/registry/index.ts:108

CargoDefinitionSummary.name

readonly quantityRaw: bigint;

Defined in: packages/sage/src/crafting/index.ts:67

readonly storageCost: number;

Defined in: packages/sage/src/registry/index.ts:109

CargoDefinitionSummary.storageCost


Defined in: packages/sage/src/crafting/index.ts:184

One resolved cargo quantity used by a Hab building definition.

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

readonly categoryId: number;

Defined in: packages/sage/src/registry/index.ts:105

CargoDefinitionSummary.categoryId

readonly id: number;

Defined in: packages/sage/src/registry/index.ts:106

CargoDefinitionSummary.id

readonly mint: Address;

Defined in: packages/sage/src/registry/index.ts:107

CargoDefinitionSummary.mint

readonly name: string;

Defined in: packages/sage/src/registry/index.ts:108

CargoDefinitionSummary.name

readonly quantityRaw: bigint;

Defined in: packages/sage/src/crafting/index.ts:185

readonly storageCost: number;

Defined in: packages/sage/src/registry/index.ts:109

CargoDefinitionSummary.storageCost


Defined in: packages/sage/src/crafting/index.ts:195

A resolved Crafting Hab building definition and placed quantity.

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

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:197

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

readonly quantity: number;

Defined in: packages/sage/src/crafting/index.ts:196


Defined in: packages/sage/src/crafting/index.ts:159

A resolved Crafting Hab definition from the Game registry.

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

readonly evictionGracePeriodSeconds: bigint;

Defined in: packages/sage/src/crafting/index.ts:172

readonly hubValue: number;

Defined in: packages/sage/src/crafting/index.ts:169

readonly id: number;

Defined in: packages/sage/src/crafting/index.ts:160

readonly name: string;

Defined in: packages/sage/src/crafting/index.ts:161

readonly placementCargo: CargoDefinitionSummary;

Defined in: packages/sage/src/crafting/index.ts:174

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

Defined in: packages/sage/src/crafting/index.ts:165

readonly raw: bigint;
readonly value: number;

readonly providedTagIds: readonly number[];

Defined in: packages/sage/src/crafting/index.ts:171

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

Defined in: packages/sage/src/crafting/index.ts:164

readonly raw: bigint;
readonly value: number;

readonly requiredTagIds: readonly number[];

Defined in: packages/sage/src/crafting/index.ts:170

readonly respawnDurationSeconds: bigint;

Defined in: packages/sage/src/crafting/index.ts:173

readonly slots: number;

Defined in: packages/sage/src/crafting/index.ts:163

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

Defined in: packages/sage/src/crafting/index.ts:162


Defined in: packages/sage/src/crafting/index.ts:230

Immutable translated Crafting Hab infrastructure and production state.

declare const hab: CraftingHabSnapshot;
console.log(hab.definition.name, hab.production.inventory.items);
  • Omit<CraftingHabAccountData, | "buildings" | "game" | "ownerProfile" | "production" | "system" | "unlockedRecipeIds">

readonly address: Address;

Defined in: packages/sage/src/crafting/index.ts:240

readonly availableJobSlots: number;

Defined in: packages/sage/src/crafting/index.ts:246

readonly buildingDefinitionSequenceId: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:207

Omit.buildingDefinitionSequenceId

readonly buildings: readonly CraftingHabBuilding[];

Defined in: packages/sage/src/crafting/index.ts:245

readonly constructionProgressAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:211

Omit.constructionProgressAtUnixSeconds

readonly constructionRemainingSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:210

Omit.constructionRemainingSeconds

readonly definition: CraftingHabDefinitionSummary;

Defined in: packages/sage/src/crafting/index.ts:244

readonly definitionId: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:205

Omit.definitionId

readonly definitionSequenceId: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:206

Omit.definitionSequenceId

readonly game: EntityRef<"game">;

Defined in: packages/sage/src/crafting/index.ts:241

readonly jobCapacity: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:214

Omit.jobCapacity

readonly jobsRunning: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:215

Omit.jobsRunning

readonly kind: "craftingHabInstance";

Defined in: packages/sage/src/crafting/index.ts:239

readonly lastRentAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:209

Omit.lastRentAtUnixSeconds

readonly modifiers: CraftingModifierData;

Defined in: packages/sage/src/internal/c4/crafting.ts:216

Omit.modifiers

readonly neededCrew: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:213

Omit.neededCrew

readonly ownerProfile: EntityRef<"profile">;

Defined in: packages/sage/src/crafting/index.ts:242

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

Defined in: packages/sage/src/crafting/index.ts:248

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

readonly rentBalanceRaw: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:212

Omit.rentBalanceRaw

readonly state: CraftingHabStateData;

Defined in: packages/sage/src/internal/c4/crafting.ts:219

Omit.state

readonly system: EntityRef<"starSystem">;

Defined in: packages/sage/src/crafting/index.ts:243

readonly systemSequenceId: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:208

Omit.systemSequenceId

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

Defined in: packages/sage/src/crafting/index.ts:247

readonly version: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:201

Omit.version

toJSON(): unknown;

Defined in: packages/sage/src/crafting/index.ts:257

unknown


Defined in: packages/sage/src/crafting/index.ts:267

Immutable translated Crafting Process with resolved Recipe and inputs.

declare const process: CraftingProcessSnapshot;
console.log(process.recipe.name, process.numCrew);
  • Omit<CraftingProcessAccountData, | "craftingHab" | "inputs" | "profile" | "recipe" | "starbasePlayer" | "system">

readonly address: Address;

Defined in: packages/sage/src/crafting/index.ts:272

readonly craftingHab: EntityRef<"craftingHabInstance">;

Defined in: packages/sage/src/crafting/index.ts:277

readonly endsAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:239

Omit.endsAtUnixSeconds

readonly feeEscrowAtlas: number;

Defined in: packages/sage/src/crafting/index.ts:279

readonly feeEscrowRaw: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:240

Omit.feeEscrowRaw

readonly inputs: CraftingCargoInventory;

Defined in: packages/sage/src/crafting/index.ts:278

readonly kind: "craftingProcess";

Defined in: packages/sage/src/crafting/index.ts:271

readonly numCrew: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:237

Omit.numCrew

readonly profile: EntityRef<"profile">;

Defined in: packages/sage/src/crafting/index.ts:274

readonly quantityRaw: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:236

Omit.quantityRaw

readonly recipe: RecipeSnapshot;

Defined in: packages/sage/src/crafting/index.ts:273

readonly starbasePlayer: EntityRef<"starbasePlayer">;

Defined in: packages/sage/src/crafting/index.ts:276

readonly starbaseSequenceId: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:234

Omit.starbaseSequenceId

readonly startsAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:238

Omit.startsAtUnixSeconds

readonly system: EntityRef<"starSystem">;

Defined in: packages/sage/src/crafting/index.ts:275

readonly version: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:229

Omit.version

toJSON(): unknown;

Defined in: packages/sage/src/crafting/index.ts:280

unknown


Defined in: packages/sage/src/crafting/index.ts:90

Immutable translated Recipe definition.

declare const recipe: RecipeSnapshot;
console.log(recipe.ingredients, recipe.outputs);
  • Omit<RecipeAccountData, "game" | "id" | "inputs" | "outputs">

readonly address: Address;

Defined in: packages/sage/src/crafting/index.ts:95

readonly craftingDurationSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:145

Omit.craftingDurationSeconds

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

Defined in: packages/sage/src/internal/c4/crafting.ts:149

readonly amountAtlas: number;
readonly amountRaw: bigint;
readonly recipient: "atlas" | "dao-atlas";
Omit.fee

readonly game: EntityRef<"game">;

Defined in: packages/sage/src/crafting/index.ts:96

readonly habRequired: boolean;

Defined in: packages/sage/src/internal/c4/crafting.ts:154

Omit.habRequired

readonly id: number;

Defined in: packages/sage/src/crafting/index.ts:97

readonly ingredients: readonly CraftingCargoItem[];

Defined in: packages/sage/src/crafting/index.ts:98

readonly kind: "recipe";

Defined in: packages/sage/src/crafting/index.ts:94

readonly minimumDurationSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:146

Omit.minimumDurationSeconds

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

Defined in: packages/sage/src/internal/c4/crafting.ts:158

Omit.minimumStarbaseLevel

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

Defined in: packages/sage/src/internal/c4/crafting.ts:166

readonly crewCount: CraftingModifierBoundsData;
readonly efficiency: CraftingModifierBoundsData;
readonly fee: CraftingModifierBoundsData;
readonly speed: CraftingModifierBoundsData;
Omit.modifierBounds

readonly name: string;

Defined in: packages/sage/src/internal/c4/crafting.ts:147

Omit.name

readonly outputs: readonly CraftingCargoItem[];

Defined in: packages/sage/src/crafting/index.ts:99

readonly researchRequirementIds: readonly number[];

Defined in: packages/sage/src/internal/c4/crafting.ts:172

Omit.researchRequirementIds

readonly status: "active" | "deactivated";

Defined in: packages/sage/src/internal/c4/crafting.ts:148

Omit.status

readonly usageCountRaw: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:155

Omit.usageCountRaw

readonly usageLimitRaw: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:156

Omit.usageLimitRaw

readonly version: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:142

Omit.version

readonly xpValueRaw: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:157

Omit.xpValueRaw

toJSON(): unknown;

Defined in: packages/sage/src/crafting/index.ts:100

unknown

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

Defined in: packages/sage/src/crafting/index.ts:54

Options supported by targeted crafting discovery.

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

type CraftingHabDefinition = GameCraftingHabDefinitionData;

Defined in: packages/sage/src/crafting/index.ts:117

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.

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

type CraftingProcessState = InternalCraftingProcessState;

Defined in: packages/sage/src/crafting/index.ts:289

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

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

type HabBuildingDefinition = GameHabBuildingDefinitionData;

Defined in: packages/sage/src/crafting/index.ts:987

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.

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

function deriveCraftingProcessState(process, atUnixSeconds): InternalCraftingProcessState;

Defined in: packages/sage/src/crafting/index.ts:967

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

ParameterType
processPick<CraftingProcessSnapshot, "startsAtUnixSeconds" | "endsAtUnixSeconds">
atUnixSecondsbigint

InternalCraftingProcessState

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

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

Defined in: packages/sage/src/crafting/index.ts:718

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

ParameterType
contextSageContext
addressAddress
options?ReadOptions

Promise<CraftingHabSnapshot>

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

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

Defined in: packages/sage/src/crafting/index.ts:128

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

ParameterType
contextSageContext
idnumber

Promise<GameCraftingHabDefinitionData>

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

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

Defined in: packages/sage/src/crafting/index.ts:906

Discovers Crafting Habs for the Profile stored by one Character.

ParameterType
contextSageContext
characterAddress
options?CraftingDiscoveryOptions

Promise<readonly CraftingHabSnapshot[]>

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

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

Defined in: packages/sage/src/crafting/index.ts:805

Discovers Crafting Habs owned by one Player Profile.

ParameterType
contextSageContext
profileAddress
options?CraftingDiscoveryOptions

Promise<readonly CraftingHabSnapshot[]>

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

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

Defined in: packages/sage/src/crafting/index.ts:855

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

ParameterType
contextSageContext
playerAddress
options?CraftingDiscoveryOptions

Promise<readonly CraftingHabSnapshot[]>

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

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

Defined in: packages/sage/src/crafting/index.ts:760

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

ParameterType
contextSageContext
addressAddress
options?ReadOptions

Promise<CraftingProcessSnapshot>

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

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

Defined in: packages/sage/src/crafting/index.ts:935

Discovers Crafting Processes for the Profile stored by one Character.

ParameterType
contextSageContext
characterAddress
options?CraftingDiscoveryOptions

Promise<readonly CraftingProcessSnapshot[]>

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

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

Defined in: packages/sage/src/crafting/index.ts:831

Discovers Crafting Processes belonging to one Player Profile.

ParameterType
contextSageContext
profileAddress
options?CraftingDiscoveryOptions

Promise<readonly CraftingProcessSnapshot[]>

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

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

Defined in: packages/sage/src/crafting/index.ts:882

Discovers Crafting Processes linked to one StarbasePlayer.

ParameterType
contextSageContext
playerAddress
options?CraftingDiscoveryOptions

Promise<readonly CraftingProcessSnapshot[]>

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

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

Defined in: packages/sage/src/crafting/index.ts:998

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

ParameterType
contextSageContext
idnumber

Promise<GameHabBuildingDefinitionData>

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

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

Defined in: packages/sage/src/crafting/index.ts:654

Reads a required Recipe by its derived account address.

ParameterType
contextSageContext
addressAddress
options?ReadOptions

Promise<RecipeSnapshot>

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

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

Defined in: packages/sage/src/crafting/index.ts:697

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

ParameterType
contextSageContext
recipeIdnumber
options?ReadOptions

Promise<RecipeSnapshot>

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

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

Defined in: packages/sage/src/crafting/index.ts:146

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.

ParameterType
contextSageContext

Promise<readonly GameCraftingHabDefinitionData[]>

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

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

Defined in: packages/sage/src/crafting/index.ts:1016

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.

ParameterType
contextSageContext

Promise<readonly GameHabBuildingDefinitionData[]>

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

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

Defined in: packages/sage/src/crafting/index.ts:738

Reads an optional Crafting Hab by address.

ParameterType
contextSageContext
addressAddress
options?ReadOptions

Promise< | CraftingHabSnapshot | undefined>

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

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

Defined in: packages/sage/src/crafting/index.ts:781

Reads an optional Crafting Process by address.

ParameterType
contextSageContext
addressAddress
options?ReadOptions

Promise< | CraftingProcessSnapshot | undefined>

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

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

Defined in: packages/sage/src/crafting/index.ts:674

Reads an optional Recipe by address.

ParameterType
contextSageContext
addressAddress
options?ReadOptions

Promise<RecipeSnapshot | undefined>

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