crafting
Interfaces
Section titled “Interfaces”CraftingCargoInventory
Section titled “CraftingCargoInventory”Defined in: packages/sage/src/crafting/index.ts:69
A registry-resolved nested crafting CargoPod.
Example
Section titled “Example”declare const inventory: CraftingCargoInventory;console.log(inventory.items);Properties
Section titled “Properties”readonly items: readonly CraftingCargoItem[];Defined in: packages/sage/src/crafting/index.ts:72
sequenceId
Section titled “sequenceId”readonly sequenceId: number;Defined in: packages/sage/src/crafting/index.ts:70
usedStorageUnitsRaw
Section titled “usedStorageUnitsRaw”readonly usedStorageUnitsRaw: bigint;Defined in: packages/sage/src/crafting/index.ts:71
CraftingCargoItem
Section titled “CraftingCargoItem”Defined in: packages/sage/src/crafting/index.ts:58
A registry-resolved cargo amount used by a Recipe or Crafting Process.
Example
Section titled “Example”declare const item: CraftingCargoItem;console.log(item.name, item.quantityRaw);Extends
Section titled “Extends”Properties
Section titled “Properties”categoryId
Section titled “categoryId”readonly categoryId: number;Defined in: packages/sage/src/registry/index.ts:69
Inherited from
Section titled “Inherited from”CargoDefinitionSummary.categoryId
readonly id: number;Defined in: packages/sage/src/registry/index.ts:70
Inherited from
Section titled “Inherited from”readonly mint: Address;Defined in: packages/sage/src/registry/index.ts:71
Inherited from
Section titled “Inherited from”readonly name: string;Defined in: packages/sage/src/registry/index.ts:72
Inherited from
Section titled “Inherited from”quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Defined in: packages/sage/src/crafting/index.ts:59
storageCost
Section titled “storageCost”readonly storageCost: number;Defined in: packages/sage/src/registry/index.ts:73
Inherited from
Section titled “Inherited from”CargoDefinitionSummary.storageCost
CraftingDefinitionCargoItem
Section titled “CraftingDefinitionCargoItem”Defined in: packages/sage/src/crafting/index.ts:127
One resolved cargo quantity used by a Hab building definition.
Example
Section titled “Example”declare const item: CraftingDefinitionCargoItem;console.log(item.quantityRaw);Extends
Section titled “Extends”Properties
Section titled “Properties”categoryId
Section titled “categoryId”readonly categoryId: number;Defined in: packages/sage/src/registry/index.ts:69
Inherited from
Section titled “Inherited from”CargoDefinitionSummary.categoryId
readonly id: number;Defined in: packages/sage/src/registry/index.ts:70
Inherited from
Section titled “Inherited from”readonly mint: Address;Defined in: packages/sage/src/registry/index.ts:71
Inherited from
Section titled “Inherited from”readonly name: string;Defined in: packages/sage/src/registry/index.ts:72
Inherited from
Section titled “Inherited from”quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Defined in: packages/sage/src/crafting/index.ts:128
storageCost
Section titled “storageCost”readonly storageCost: number;Defined in: packages/sage/src/registry/index.ts:73
Inherited from
Section titled “Inherited from”CargoDefinitionSummary.storageCost
CraftingHabBuilding
Section titled “CraftingHabBuilding”Defined in: packages/sage/src/crafting/index.ts:138
A resolved Crafting Hab building definition and placed quantity.
Example
Section titled “Example”declare const building: CraftingHabBuilding;console.log(building.definition.name, building.quantity);Properties
Section titled “Properties”definition
Section titled “definition”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:140
constructionCost
Section titled “constructionCost”readonly constructionCost: readonly CraftingDefinitionCargoItem[];constructionDurationSeconds
Section titled “constructionDurationSeconds”readonly constructionDurationSeconds: bigint;crewSlots
Section titled “crewSlots”readonly crewSlots: number;hubValue
Section titled “hubValue”readonly hubValue: number;readonly id: number;jobCapacity
Section titled “jobCapacity”readonly jobCapacity: number;minimumTier
Section titled “minimumTier”readonly minimumTier: "one" | "two" | "three" | "four" | "five";modifiers
Section titled “modifiers”readonly modifiers: CraftingModifierData;readonly name: string;neededCrew
Section titled “neededCrew”readonly neededCrew: number;netRates
Section titled “netRates”readonly netRates: readonly CargoDefinitionSummary & { unitsPerSecond: number; unitsPerSecondRaw: bigint;}[];providedTagIds
Section titled “providedTagIds”readonly providedTagIds: readonly number[];refunds
Section titled “refunds”readonly refunds: readonly CraftingDefinitionCargoItem[];requiredTagIds
Section titled “requiredTagIds”readonly requiredTagIds: readonly number[];researchRequirementIds
Section titled “researchRequirementIds”readonly researchRequirementIds: readonly number[];resourceCapacityRaw
Section titled “resourceCapacityRaw”readonly resourceCapacityRaw: bigint;readonly slots: number;unlockedRecipes
Section titled “unlockedRecipes”readonly unlockedRecipes: readonly EntityRef<"recipe">[];xpValue
Section titled “xpValue”readonly xpValue: { raw: bigint; value: number;};xpValue.raw
Section titled “xpValue.raw”readonly raw: bigint;xpValue.value
Section titled “xpValue.value”readonly value: number;quantity
Section titled “quantity”readonly quantity: number;Defined in: packages/sage/src/crafting/index.ts:139
CraftingHabDefinitionSummary
Section titled “CraftingHabDefinitionSummary”Defined in: packages/sage/src/crafting/index.ts:102
A resolved Crafting Hab definition from the Game registry.
Example
Section titled “Example”declare const definition: CraftingHabDefinitionSummary;console.log(definition.name, definition.placementCargo.name);Properties
Section titled “Properties”evictionGracePeriodSeconds
Section titled “evictionGracePeriodSeconds”readonly evictionGracePeriodSeconds: bigint;Defined in: packages/sage/src/crafting/index.ts:115
hubValue
Section titled “hubValue”readonly hubValue: number;Defined in: packages/sage/src/crafting/index.ts:112
readonly id: number;Defined in: packages/sage/src/crafting/index.ts:103
readonly name: string;Defined in: packages/sage/src/crafting/index.ts:104
placementCargo
Section titled “placementCargo”readonly placementCargo: CargoDefinitionSummary;Defined in: packages/sage/src/crafting/index.ts:117
placementFeeMultiplier
Section titled “placementFeeMultiplier”readonly placementFeeMultiplier: { raw: bigint; value: number;};Defined in: packages/sage/src/crafting/index.ts:108
readonly raw: bigint;readonly value: number;providedTagIds
Section titled “providedTagIds”readonly providedTagIds: readonly number[];Defined in: packages/sage/src/crafting/index.ts:114
rentMultiplier
Section titled “rentMultiplier”readonly rentMultiplier: { raw: bigint; value: number;};Defined in: packages/sage/src/crafting/index.ts:107
readonly raw: bigint;readonly value: number;requiredTagIds
Section titled “requiredTagIds”readonly requiredTagIds: readonly number[];Defined in: packages/sage/src/crafting/index.ts:113
respawnDurationSeconds
Section titled “respawnDurationSeconds”readonly respawnDurationSeconds: bigint;Defined in: packages/sage/src/crafting/index.ts:116
readonly slots: number;Defined in: packages/sage/src/crafting/index.ts:106
readonly tier: "one" | "two" | "three" | "four" | "five";Defined in: packages/sage/src/crafting/index.ts:105
CraftingHabSnapshot
Section titled “CraftingHabSnapshot”Defined in: packages/sage/src/crafting/index.ts:173
Immutable translated Crafting Hab infrastructure and production state.
Example
Section titled “Example”declare const hab: CraftingHabSnapshot;console.log(hab.definition.name, hab.production.inventory.items);Extends
Section titled “Extends”Omit<CraftingHabAccountData, |"buildings"|"game"|"ownerProfile"|"production"|"system"|"unlockedRecipeIds">
Extended by
Section titled “Extended by”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/crafting/index.ts:183
availableJobSlots
Section titled “availableJobSlots”readonly availableJobSlots: number;Defined in: packages/sage/src/crafting/index.ts:189
buildingDefinitionSequenceId
Section titled “buildingDefinitionSequenceId”readonly buildingDefinitionSequenceId: number;Defined in: packages/sage/src/internal/c4/crafting.ts:207
Inherited from
Section titled “Inherited from”Omit.buildingDefinitionSequenceIdbuildings
Section titled “buildings”readonly buildings: readonly CraftingHabBuilding[];Defined in: packages/sage/src/crafting/index.ts:188
constructionProgressAtUnixSeconds
Section titled “constructionProgressAtUnixSeconds”readonly constructionProgressAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:211
Inherited from
Section titled “Inherited from”Omit.constructionProgressAtUnixSecondsconstructionRemainingSeconds
Section titled “constructionRemainingSeconds”readonly constructionRemainingSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:210
Inherited from
Section titled “Inherited from”Omit.constructionRemainingSecondsdefinition
Section titled “definition”readonly definition: CraftingHabDefinitionSummary;Defined in: packages/sage/src/crafting/index.ts:187
definitionId
Section titled “definitionId”readonly definitionId: number;Defined in: packages/sage/src/internal/c4/crafting.ts:205
Inherited from
Section titled “Inherited from”Omit.definitionIddefinitionSequenceId
Section titled “definitionSequenceId”readonly definitionSequenceId: number;Defined in: packages/sage/src/internal/c4/crafting.ts:206
Inherited from
Section titled “Inherited from”Omit.definitionSequenceIdreadonly game: EntityRef<"game">;Defined in: packages/sage/src/crafting/index.ts:184
jobCapacity
Section titled “jobCapacity”readonly jobCapacity: number;Defined in: packages/sage/src/internal/c4/crafting.ts:214
Inherited from
Section titled “Inherited from”Omit.jobCapacityjobsRunning
Section titled “jobsRunning”readonly jobsRunning: number;Defined in: packages/sage/src/internal/c4/crafting.ts:215
Inherited from
Section titled “Inherited from”Omit.jobsRunningreadonly kind: "craftingHabInstance";Defined in: packages/sage/src/crafting/index.ts:182
lastRentAtUnixSeconds
Section titled “lastRentAtUnixSeconds”readonly lastRentAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:209
Inherited from
Section titled “Inherited from”Omit.lastRentAtUnixSecondsmodifiers
Section titled “modifiers”readonly modifiers: CraftingModifierData;Defined in: packages/sage/src/internal/c4/crafting.ts:216
Inherited from
Section titled “Inherited from”Omit.modifiersneededCrew
Section titled “neededCrew”readonly neededCrew: number;Defined in: packages/sage/src/internal/c4/crafting.ts:213
Inherited from
Section titled “Inherited from”Omit.neededCrewownerProfile
Section titled “ownerProfile”readonly ownerProfile: EntityRef<"profile">;Defined in: packages/sage/src/crafting/index.ts:185
production
Section titled “production”readonly production: { inventory: CraftingCargoInventory; lastTickAtUnixSeconds: bigint; netRates: readonly CargoDefinitionSummary & { unitsPerSecond: number; unitsPerSecondRaw: bigint; }[]; resourceCapacityRaw: bigint;};Defined in: packages/sage/src/crafting/index.ts:191
inventory
Section titled “inventory”readonly inventory: CraftingCargoInventory;lastTickAtUnixSeconds
Section titled “lastTickAtUnixSeconds”readonly lastTickAtUnixSeconds: bigint;netRates
Section titled “netRates”readonly netRates: readonly CargoDefinitionSummary & { unitsPerSecond: number; unitsPerSecondRaw: bigint;}[];resourceCapacityRaw
Section titled “resourceCapacityRaw”readonly resourceCapacityRaw: bigint;rentBalanceRaw
Section titled “rentBalanceRaw”readonly rentBalanceRaw: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:212
Inherited from
Section titled “Inherited from”Omit.rentBalanceRawreadonly state: CraftingHabStateData;Defined in: packages/sage/src/internal/c4/crafting.ts:219
Inherited from
Section titled “Inherited from”Omit.statesystem
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/crafting/index.ts:186
systemSequenceId
Section titled “systemSequenceId”readonly systemSequenceId: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:208
Inherited from
Section titled “Inherited from”Omit.systemSequenceIdunlockedRecipes
Section titled “unlockedRecipes”readonly unlockedRecipes: readonly EntityRef<"recipe">[];Defined in: packages/sage/src/crafting/index.ts:190
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/crafting.ts:201
Inherited from
Section titled “Inherited from”Omit.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/crafting/index.ts:200
Returns
Section titled “Returns”unknown
CraftingProcessSnapshot
Section titled “CraftingProcessSnapshot”Defined in: packages/sage/src/crafting/index.ts:210
Immutable translated Crafting Process with resolved Recipe and inputs.
Example
Section titled “Example”declare const process: CraftingProcessSnapshot;console.log(process.recipe.name, process.numCrew);Extends
Section titled “Extends”Omit<CraftingProcessAccountData, |"craftingHab"|"inputs"|"profile"|"recipe"|"starbasePlayer"|"system">
Extended by
Section titled “Extended by”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/crafting/index.ts:215
craftingHab
Section titled “craftingHab”readonly craftingHab: EntityRef<"craftingHabInstance">;Defined in: packages/sage/src/crafting/index.ts:220
endsAtUnixSeconds
Section titled “endsAtUnixSeconds”readonly endsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:239
Inherited from
Section titled “Inherited from”Omit.endsAtUnixSecondsfeeEscrowAtlas
Section titled “feeEscrowAtlas”readonly feeEscrowAtlas: number;Defined in: packages/sage/src/crafting/index.ts:222
feeEscrowRaw
Section titled “feeEscrowRaw”readonly feeEscrowRaw: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:240
Inherited from
Section titled “Inherited from”Omit.feeEscrowRawinputs
Section titled “inputs”readonly inputs: CraftingCargoInventory;Defined in: packages/sage/src/crafting/index.ts:221
readonly kind: "craftingProcess";Defined in: packages/sage/src/crafting/index.ts:214
numCrew
Section titled “numCrew”readonly numCrew: number;Defined in: packages/sage/src/internal/c4/crafting.ts:237
Inherited from
Section titled “Inherited from”Omit.numCrewprofile
Section titled “profile”readonly profile: EntityRef<"profile">;Defined in: packages/sage/src/crafting/index.ts:217
quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:236
Inherited from
Section titled “Inherited from”Omit.quantityRawrecipe
Section titled “recipe”readonly recipe: RecipeSnapshot;Defined in: packages/sage/src/crafting/index.ts:216
starbasePlayer
Section titled “starbasePlayer”readonly starbasePlayer: EntityRef<"starbasePlayer">;Defined in: packages/sage/src/crafting/index.ts:219
starbaseSequenceId
Section titled “starbaseSequenceId”readonly starbaseSequenceId: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:234
Inherited from
Section titled “Inherited from”Omit.starbaseSequenceIdstartsAtUnixSeconds
Section titled “startsAtUnixSeconds”readonly startsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:238
Inherited from
Section titled “Inherited from”Omit.startsAtUnixSecondssystem
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/crafting/index.ts:218
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/crafting.ts:229
Inherited from
Section titled “Inherited from”Omit.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/crafting/index.ts:223
Returns
Section titled “Returns”unknown
RecipeSnapshot
Section titled “RecipeSnapshot”Defined in: packages/sage/src/crafting/index.ts:82
Immutable translated Recipe definition.
Example
Section titled “Example”declare const recipe: RecipeSnapshot;console.log(recipe.ingredients, recipe.outputs);Extends
Section titled “Extends”Omit<RecipeAccountData,"game"|"id"|"inputs"|"outputs">
Extended by
Section titled “Extended by”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/crafting/index.ts:87
craftingDurationSeconds
Section titled “craftingDurationSeconds”readonly craftingDurationSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:145
Inherited from
Section titled “Inherited from”Omit.craftingDurationSecondsreadonly fee: { amountAtlas: number; amountRaw: bigint; recipient: "atlas" | "dao-atlas";};Defined in: packages/sage/src/internal/c4/crafting.ts:149
amountAtlas
Section titled “amountAtlas”readonly amountAtlas: number;amountRaw
Section titled “amountRaw”readonly amountRaw: bigint;recipient
Section titled “recipient”readonly recipient: "atlas" | "dao-atlas";Inherited from
Section titled “Inherited from”Omit.feereadonly game: EntityRef<"game">;Defined in: packages/sage/src/crafting/index.ts:88
habRequired
Section titled “habRequired”readonly habRequired: boolean;Defined in: packages/sage/src/internal/c4/crafting.ts:154
Inherited from
Section titled “Inherited from”Omit.habRequiredreadonly id: number;Defined in: packages/sage/src/crafting/index.ts:89
ingredients
Section titled “ingredients”readonly ingredients: readonly CraftingCargoItem[];Defined in: packages/sage/src/crafting/index.ts:90
readonly kind: "recipe";Defined in: packages/sage/src/crafting/index.ts:86
minimumDurationSeconds
Section titled “minimumDurationSeconds”readonly minimumDurationSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:146
Inherited from
Section titled “Inherited from”Omit.minimumDurationSecondsminimumStarbaseLevel
Section titled “minimumStarbaseLevel”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
Inherited from
Section titled “Inherited from”Omit.minimumStarbaseLevelmodifierBounds
Section titled “modifierBounds”readonly modifierBounds: { crewCount: CraftingModifierBoundsData; efficiency: CraftingModifierBoundsData; fee: CraftingModifierBoundsData; speed: CraftingModifierBoundsData;};Defined in: packages/sage/src/internal/c4/crafting.ts:166
crewCount
Section titled “crewCount”readonly crewCount: CraftingModifierBoundsData;efficiency
Section titled “efficiency”readonly efficiency: CraftingModifierBoundsData;readonly fee: CraftingModifierBoundsData;readonly speed: CraftingModifierBoundsData;Inherited from
Section titled “Inherited from”Omit.modifierBoundsreadonly name: string;Defined in: packages/sage/src/internal/c4/crafting.ts:147
Inherited from
Section titled “Inherited from”Omit.nameoutputs
Section titled “outputs”readonly outputs: readonly CraftingCargoItem[];Defined in: packages/sage/src/crafting/index.ts:91
researchRequirementIds
Section titled “researchRequirementIds”readonly researchRequirementIds: readonly number[];Defined in: packages/sage/src/internal/c4/crafting.ts:172
Inherited from
Section titled “Inherited from”Omit.researchRequirementIdsstatus
Section titled “status”readonly status: "active" | "deactivated";Defined in: packages/sage/src/internal/c4/crafting.ts:148
Inherited from
Section titled “Inherited from”Omit.statususageCountRaw
Section titled “usageCountRaw”readonly usageCountRaw: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:155
Inherited from
Section titled “Inherited from”Omit.usageCountRawusageLimitRaw
Section titled “usageLimitRaw”readonly usageLimitRaw: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:156
Inherited from
Section titled “Inherited from”Omit.usageLimitRawversion
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/crafting.ts:142
Inherited from
Section titled “Inherited from”Omit.versionxpValueRaw
Section titled “xpValueRaw”readonly xpValueRaw: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:157
Inherited from
Section titled “Inherited from”Omit.xpValueRawMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/crafting/index.ts:92
Returns
Section titled “Returns”unknown
Type Aliases
Section titled “Type Aliases”CraftingDiscoveryOptions
Section titled “CraftingDiscoveryOptions”type CraftingDiscoveryOptions = Omit<DiscoveryRequest, "filters" | "strategy">;Defined in: packages/sage/src/crafting/index.ts:46
Options supported by targeted crafting discovery.
Example
Section titled “Example”const options: CraftingDiscoveryOptions = { commitment: 'confirmed' };CraftingProcessState
Section titled “CraftingProcessState”type CraftingProcessState = | { kind: "scheduled";} | { kind: "in-progress"; remainingSeconds: bigint;} | { kind: "complete";};Defined in: packages/sage/src/crafting/index.ts:232
Pure lifecycle projection for one Crafting Process at a given Unix time.
Example
Section titled “Example”const state: CraftingProcessState = { kind: 'scheduled' };Functions
Section titled “Functions”deriveCraftingProcessState()
Section titled “deriveCraftingProcessState()”function deriveCraftingProcessState(process, atUnixSeconds): CraftingProcessState;Defined in: packages/sage/src/crafting/index.ts:913
Derives the scheduled, active, or complete state at a Unix timestamp.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
process | Pick<CraftingProcessSnapshot, "startsAtUnixSeconds" | "endsAtUnixSeconds"> |
atUnixSeconds | bigint |
Returns
Section titled “Returns”Example
Section titled “Example”declare const process: CraftingProcessSnapshot;const state = deriveCraftingProcessState(process, 1_700_000_000n);getCraftingHab()
Section titled “getCraftingHab()”function getCraftingHab( context, address,options?): Promise<CraftingHabSnapshot>;Defined in: packages/sage/src/crafting/index.ts:664
Reads a required Crafting Hab by its signer-created account address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CraftingHabSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const hab = await getCraftingHab(ctx, address);getCraftingHabsByCharacter()
Section titled “getCraftingHabsByCharacter()”function getCraftingHabsByCharacter( context, character,options?): Promise<readonly CraftingHabSnapshot[]>;Defined in: packages/sage/src/crafting/index.ts:852
Discovers Crafting Habs for the Profile stored by one Character.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
character | Address |
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingHabSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;declare const character: Address;const habs = await getCraftingHabsByCharacter(ctx, character);getCraftingHabsByProfile()
Section titled “getCraftingHabsByProfile()”function getCraftingHabsByProfile( context, profile,options?): Promise<readonly CraftingHabSnapshot[]>;Defined in: packages/sage/src/crafting/index.ts:751
Discovers Crafting Habs owned by one Player Profile.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
profile | Address |
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingHabSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;declare const profile: Address;const habs = await getCraftingHabsByProfile(ctx, profile);getCraftingHabsByStarbasePlayer()
Section titled “getCraftingHabsByStarbasePlayer()”function getCraftingHabsByStarbasePlayer( context, player,options?): Promise<readonly CraftingHabSnapshot[]>;Defined in: packages/sage/src/crafting/index.ts:801
Discovers Crafting Habs for the Profile and System stored by a StarbasePlayer.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
player | Address |
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingHabSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;declare const player: Address;const habs = await getCraftingHabsByStarbasePlayer(ctx, player);getCraftingProcess()
Section titled “getCraftingProcess()”function getCraftingProcess( context, address,options?): Promise<CraftingProcessSnapshot>;Defined in: packages/sage/src/crafting/index.ts:706
Reads a required Crafting Process by its signer-created account address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CraftingProcessSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const process = await getCraftingProcess(ctx, address);getCraftingProcessesByCharacter()
Section titled “getCraftingProcessesByCharacter()”function getCraftingProcessesByCharacter( context, character,options?): Promise<readonly CraftingProcessSnapshot[]>;Defined in: packages/sage/src/crafting/index.ts:881
Discovers Crafting Processes for the Profile stored by one Character.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
character | Address |
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingProcessSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;declare const character: Address;const processes = await getCraftingProcessesByCharacter(ctx, character);getCraftingProcessesByProfile()
Section titled “getCraftingProcessesByProfile()”function getCraftingProcessesByProfile( context, profile,options?): Promise<readonly CraftingProcessSnapshot[]>;Defined in: packages/sage/src/crafting/index.ts:777
Discovers Crafting Processes belonging to one Player Profile.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
profile | Address |
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingProcessSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;declare const profile: Address;const processes = await getCraftingProcessesByProfile(ctx, profile);getCraftingProcessesByStarbasePlayer()
Section titled “getCraftingProcessesByStarbasePlayer()”function getCraftingProcessesByStarbasePlayer( context, player,options?): Promise<readonly CraftingProcessSnapshot[]>;Defined in: packages/sage/src/crafting/index.ts:828
Discovers Crafting Processes linked to one StarbasePlayer.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
player | Address |
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingProcessSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;declare const player: Address;const processes = await getCraftingProcessesByStarbasePlayer(ctx, player);getRecipe()
Section titled “getRecipe()”function getRecipe( context, address,options?): Promise<RecipeSnapshot>;Defined in: packages/sage/src/crafting/index.ts:600
Reads a required Recipe by its derived account address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<RecipeSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const recipe = await getRecipe(ctx, address);getRecipeById()
Section titled “getRecipeById()”function getRecipeById( context, recipeId,options?): Promise<RecipeSnapshot>;Defined in: packages/sage/src/crafting/index.ts:643
Derives and reads one Recipe from the configured Game and recipe id.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
recipeId | number |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<RecipeSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;const recipe = await getRecipeById(ctx, 7);maybeGetCraftingHab()
Section titled “maybeGetCraftingHab()”function maybeGetCraftingHab( context, address, options?): Promise< | CraftingHabSnapshot| undefined>;Defined in: packages/sage/src/crafting/index.ts:684
Reads an optional Crafting Hab by address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<
| CraftingHabSnapshot
| undefined>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const hab = await maybeGetCraftingHab(ctx, address);maybeGetCraftingProcess()
Section titled “maybeGetCraftingProcess()”function maybeGetCraftingProcess( context, address, options?): Promise< | CraftingProcessSnapshot| undefined>;Defined in: packages/sage/src/crafting/index.ts:727
Reads an optional Crafting Process by address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<
| CraftingProcessSnapshot
| undefined>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const process = await maybeGetCraftingProcess(ctx, address);maybeGetRecipe()
Section titled “maybeGetRecipe()”function maybeGetRecipe( context, address,options?): Promise<RecipeSnapshot | undefined>;Defined in: packages/sage/src/crafting/index.ts:620
Reads an optional Recipe by address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<RecipeSnapshot | undefined>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const recipe = await maybeGetRecipe(ctx, address);