Carbon Crafting Decoder
Rust decoder for the Star Atlas Crafting program on Solana, generated using Carbon CLI.
Program Information
- Program ID:
CRAFT2RPXPJWCEix4WpJST3E7NLf79GTqZUL75wngXo5 - Network: Solana Mainnet
- Description: Star Atlas Crafting program for managing recipes, crafting facilities, and crafting processes. Enables players to create items using consumable and non-consumable inputs at specialized facilities.
Features
- Decodes all Crafting account types
- Full instruction parsing support
- Integration with Carbon indexing framework
- Type-safe enum support for process/recipe status and location types
- Support for recipes with dynamic inputs/outputs
Usage
Add this crate to your Cargo.toml:
[]
= "0.12.0"
Decoding Accounts
use ;
use AccountDecoder;
let decoder = CraftingDecoder;
let decoded_account = decoder.decode_account;
if let Some = decoded_account
Working with Status Enums
The decoder provides type-safe enums for status and type fields:
use ;
// Check process status
match process.status
// Check recipe status
match recipe.status
// Check facility location type
match facility.location_type
Account Types
This decoder supports all Crafting account types:
Recipe- Blueprint defining inputs, outputs, duration, and requirements for crafting. Includesrecipe_items(Vec) containing all consumable/non-consumable inputs and outputs with amounts and mint addresses.CraftingFacility- Physical location where crafting occurs with efficiency modifiers. Includesrecipe_categories(Vec) listing all recipe categories available at this facility.CraftingProcess- Active crafting operation tracking progress and statusCraftableItem- Item that can be produced through craftingDomain- Administrative domain controlling crafting permissionsRecipeCategory- Classification system for organizing recipes
Status Enums
ProcessStatus
Initialized- Process created but not yet startedStarted- Crafting in progressCompleted- Crafting finished, ready to claim outputs
RecipeStatus
Initializing- Recipe being configuredActive- Recipe available for useDeactivated- Recipe disabled and unavailable
LocationType
Starbase- Crafting facility located at a starbase
Documentation
Full documentation is available at docs.rs.
Repository
See the main repository for build instructions and contribution guidelines.
License
Licensed under the Apache-2.0 license.