0.1.2 • Published 3 years ago

loot-sdk v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago