Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.6 KB

readme.md

File metadata and controls

50 lines (38 loc) · 1.6 KB

Loot Survivor Logo Loot Survivor SDK

npm version License: MIT Build Status

🚧 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

Features

  • ✅ Execution client
  • ✅ Game Constants
  • ✅ Hosted Images
  • ✅ Abstracted GraphQL queries for deep information
  • ✅ React Package
  • 🚧 Zustand State Management (WIP)
  • 🚧 gRPC provider (coming soon)

Usage

// 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);