Skip to content

BibliothecaDAO/loot-survivor-sdk

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published