🚧 WIP: This is an evolving project. We are looking for active contributors.
This SDK enables easy creation of Loot Survivor experiences. It provides everything you need to build a fully functioning client for Loot Survivor.
pnpm add @lootsurvivor/core @lootsurvivor/react
- ✅ Execution client
- ✅ Game Constants
- ✅ Hosted Images
- ✅ Abstracted GraphQL queries for deep information
- ✅ React Package
- 🚧 Zustand State Management (WIP)
- 🚧 gRPC provider (coming soon)
// Full Provider which exposes all the Managers along with an execution client
const survivor = new LootSurvivor(
nodeUrl,
lootSurvivorAddress,
beastsAddress,
goldenTokenAddress,
account
);
// usage
await survivor.newGame();
// Selective Managers - These contain all logic to use along with images
const beastsManager = new BeastManager();
const lootManager = new LootManager(id, xp, seed); // will tell you what your item will become
const obstacleManager = new ObstacleManager();
// usage
beastsManager.getBeastName(Beasts.Warlock);
// get image from s3
beastsManager.getBeastImage(Beasts.Warlock);