npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

kyst

v1.1.0

Published

A Cryptokittie API wrapper.

Downloads

12

Readme

Kyst: Simple Cryptokitties API Wrapper for NodeJS

Description

This is a simplistic API wrapper for Cryptokitties. There is one class KystClient with basic methods to get basic information.

src/example.js has a simplistic usage of it listing links of cryptokitties whose current price is less than the calculated median.

Install:

npm install kyst
yarn add kyst

Running Example:

This assumes you know nothing about programming.

Steps:

  1. Install NodeJS.
  2. Install git.
  3. Open your command prompt by typing cmd in the search bar for Windows or Spotlight search terminal for OSX.
  4. Type node -v and git --version. You should see their respective version numbers.
  5. Navigate to some place where you want to store this repository via cd <directory> If you are in Windows, run dir to see a list of directories. If you are on OSX, run lsto see a list of directories.
  6. Run the following git clone https://github.com/lamdaV/kyst.git. This clones the repository files to the current directory you are in.
  7. Move into the directory by running cd kyst.
  8. Run npm install to download dependencies.
  9. Run node dist/example.js. This will try to find 10 cryptokitties with a current price that is less than the median price and with a generation of less than or equal to 8. This will print out the links to each cryptokitties when done.
  10. If you want to change the number of cryptokitties to find, go into src/example.js and find this
findNKitties(10) // <--- Change 10 to whatever you want.
  .then((matchedUrls) => {
    console.log("\nFound Kitties: ");
    matchedUrls.forEach((matchedUrl) => console.log(matchedUrl))
  });
  1. Run npm run buildall. This rebuilds all the files. Then, run node dist/example.js.

Contribute:

Feel free to contribute. Fork the repository, make your changes, make a pull request with details of changes, and tag me in it.

Docs:

NOTE All KystClient methods return a Promise.

KystClient.getAuctions(offset, limit, type, status)

Gets a list of Auction data from Cryptokitties.

Params:
  • offset - integer of Cryptokitties to skip by
  • limit - integer of Cryptokitties to return between 1 and 100
  • type - an element of the set { "sales", "sire" }
  • status - an element of the set { "open", "closed" }

KystClient.getKitty(kittyId)

Gets a Cryptokitties info.

Params:
  • kittyId - integer of the Cryptokittie's identifier

KystClient.getUser(userAddress)

Params:
  • userAddress - string of the hex address of the Cryptokittie user

KystClient.getMetaData()

Gets Meta Data from nieldlr cryptokitties dashboard

KystClient.getAveragePriceUSD()

Facade to get the average price in USD from the nieldlr cryptokitties dashboard.

KystClient.getMedianPriceUSD()

Facade to get the median price in USD from the nieldlr cryptokitties dashboard.

KystClient.convertUSD2ETH(usd)

Helper method to convert USD to ETH.

Params:
  • usd - number of the USD value to convert

KystClient.getCAttributes()

Gets an Object of existing cattributes and their corresponding count from cryptokittydex.

Dependencies: