import { type KitBlueprint, type KitOwnerIdKind } from './core.js'; /** Options for {@link inventoryBlueprint}. */ export interface InventoryBlueprintOptions { /** * Prefix applied to the container type names (e.g. `'Bank'` → * `BankInventory` / `BankItemStack`) and, snake-cased, to the function * names (`bank_grant_stack`, …). Lets several independent inventory systems * coexist in one app. Defaults to none. */ typePrefix?: string; /** Default `max_slots` on new inventories. Defaults to 24. */ maxSlots?: number; /** Exclusive upper bound for stack `slot` indexes. Defaults to 64. */ slotCount?: number; /** * Recipes compiled into atomic Model functions. Each generated function * consumes every input stack and grants the output stack in ONE * transaction; all refs must be caller-owned and item ids must match. */ recipes?: InventoryRecipeSpec[]; /** Item-for-item offers compiled into atomic barter functions. */ barters?: InventoryBarterSpec[]; /** Owner mirror representation. Defaults to `int`; legacy worlds may use `string`. */ ownerIdKind?: KitOwnerIdKind; /** * Who may instantiate ItemStack rows. Defaults to `member` for backwards * compatibility; competitive games should use `admin` and create empty * stacks through a trusted compute/bootstrap path. */ stackInstantiableBy?: 'member' | 'admin'; /** * Who may call the generic grant function. `owner` preserves the original * sandbox-friendly behavior; competitive games should use `server` and * grant only through trusted transactions/referees. */ grantAuthority?: 'owner' | 'server'; } export interface InventoryRecipeSpec { recipeId: string; inputs: Array<{ itemId: string; quantity: number; }>; output: { itemId: string; quantity: number; }; } export interface InventoryBarterSpec { barterId: string; pay: { itemId: string; quantity: number; }; receive: { itemId: string; quantity: number; }; } export declare function inventoryCraftFunctionName(recipeId: string, typePrefix?: string): string; export declare function inventoryBarterFunctionName(barterId: string, typePrefix?: string): string; /** Names derived by {@link inventoryBlueprint} for a given prefix. */ export interface InventoryNames { inventoryType: string; stackType: string; grantFn: string; consumeFn: string; moveFn: string; transferFn: string; containsEdge: string; } /** Compute the type/function names an inventory blueprint (and its runtime helper) uses. */ export declare function inventoryNames(typePrefix?: string): InventoryNames; /** * Blueprint for a server-authoritative **inventory**: a per-player * `Inventory` container plus `ItemStack` containers (`item_id`, `quantity`, * `slot`), and owner-gated functions to grant, consume, move, and transfer * stacks. Quantity guards live in the invoke policies, so an untrusted client * can never overdraw or touch another player's items. * * Runtime counterpart: `client.kit(appId).inventory`. */ export declare function inventoryBlueprint(options?: InventoryBlueprintOptions): KitBlueprint; //# sourceMappingURL=inventory.d.ts.map