What problem does it solve?
EGS-game helps developers build composable, provable on-chain games and platform integrations that follow the Provable Games Embeddable Game Standard on Starknet, removing ambiguity around token-keyed storage, score reporting, and discovery metadata. It ensures game contracts expose standardized score and game-over interfaces, register SRC5 interface IDs for discovery, and integrate cleanly with MinigameToken and metagame platforms so sessions are transferable, verifiable, and platform-ready.
Core Features & Use Cases
- IMinigameTokenData implementation for token-keyed score and game-over state so multiple concurrent sessions per player are supported.
- SRC5 registration & Registry integration to enable discovery by MinigameToken and platforms.
- Pre/post action hooks and ownership assertions to validate actions, wrap game logic, and emit callbacks for metagames.
- Packed token ID encoding & batch queries for gas-efficient score retrieval and deterministic session metadata.
- Frontend integration with denshokan-sdk for client decoding, token listing, and real-time score updates.
- Use case: Implement a Cairo Minigame that mints sessions via a platform, tracks scores by token ID, and exposes batch endpoints for leaderboards.
Quick Start
Use the egs-game skill to implement IMinigameTokenData, register IMINIGAME_ID via SRC5, and wrap player actions with pre_action/post_action hooks to expose score and game_over by token ID.