Skip to content

divinerobes/loot-sdk

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

unofficial Loot sdk

Installation

yarn add loot-sdk    # or npm install loot-sdk

Usage

import * as Loot from 'loot-sdk';
// or import individual functions, like:
// import { getBag } from 'loot-sdk';

async function logBagInfo(bagId: number) {
  const bag = await Loot.getBag(bagId);
  console.log(bag);
  /*
    outputs to log:
    {
      "id": 77,
      "chest": "Divine Robe",
      "foot": "Leather Boots",
      "hand": "Heavy Gloves",
      "head": "Leather Cap",
      "neck": "Amulet",
      "ring": "Platinum Ring",
      "waist": "Silk Sash",
      "weapon": "Bone Wand",
      "rarityRank": 6169,
      "currentOwner": {
        "address": "0xf73fe15cfb88ea3c7f301f16ade3c02564aca407",
          "bagsHeld": "1",
          "joined": "1630088328"
      },
      "minted": "2021-08-27T18:18:48.000Z"
    }
  */
}

Functions

// returns a Bag object, containing metadata and information about the current owner
async getBag(bagId: number);

// returns an array of Bag objects with metadata
async getBagsInWallet(address: string);

// returns an array of Transfer objects, including bagIds
async getRecentTransfersForBag(bagId: number);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published