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

skytale-commons

v1.6.6

Published

Skytale utilities and most common used types

Downloads

29

Readme

Skytale Commons

Skytale utilities and most common used types

Wiki Documentation

Sections

Abi Decoder

Utility for decoding raw input from EVM transactions.

It can be used either as a stand-alone instance or as pool of instances for heavy use.

Implementation based on npm package abi-decoder

environment variables

|Name|Description|Required|default| |---|---|:---:|---| |MAX_NUMBER_OF_DECODER_INSTANCES| max number of instances in pool of ABI Decoder | false | 10 | |MIN_NUMBER_OF_DECODER_INSTANCES| min number of instances in pool of ABI Decoder | fakse | 2 |

Covalent

Access to the main Covalent API functions.

Covalent API Documetation

Implemented:

environment variables

|Name|Description|Required|default| |---|---|:---:|---| |COVALENT_URL| covalent api url | false | https://api.covalenthq.com/v1 | |COVALENT_API_KEY| covalent api key | true | |

Coingecko

Utilities' functions to access Coingecko price service and accessories.

It converts the chain ids and symbols in Coingecko internal identifiers.

Coingecko API Documetation

environment variables

|Name|Description|Required|default| |---|---|:---:|---| |COINGECKO_URL| coingecko api url | false | https://api.coingecko.com/api/v3 | |

Usage

npm i skytale-commons

A few examples of usage:

  • Coingecko Data
import { getSupportedCurrenciesFromCache, getCoinListFromCache, getAssetPlatformsFromCache } from "skytale-commons";

// get the list of supported fiat currencies from 24h cache
const supportedCurrencies = await getSupportedCurrenciesFromCache();

// get the coin list from 24h cache 
const coins = await getCoinListFromCache();

// get the asset platforms list from 24h cache
const assets = await getAssetPlatformsFromCache()
import { getCoinBySymbol, getCoinsBySymbols } from "skytale-commons";

// get a single coin from a symbol
const coin = await getCoinBySymbol("ETH");

// get an array of coins from an array of symbols
const coins = await getCoinsBySymbols(["ETH", "BNB"]);

// get a Coingecko Asset Id from a chain id
const id = getChainIdentifier(1);
  • Current prices
import { getPriceByTokenSymbol, getPriceByTokenAddress } from "skytale-commons";

const pricesBySymbol = await getPriceByTokenSymbol(
  ["ETH", "HEX"],
  ["USD", "EUR", "GBP"],
  {
    include_last_updated_at: true,
    include_24hr_change: true,
    include_24hr_vol: true,
    include_market_cap: true
  });

const pricesByTokenAddress = await getPriceByTokenAddress(
  1,
  ["0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39","0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE"],
  ["USD", "EUR", "GBP"],
  {
    include_last_updated_at: true,
    include_24hr_change: true,
    include_24hr_vol: true,
    include_market_cap: true
  });

Contributors

Skytale Commons is developed by the Skytale team.

||| |---|---| |Joris Borsboom | @jorisborsboom | |Patrik Csokas | @patricck | |Avinash Buddana | @avinash.buddana1 | |Martin Mali | @martinheti | |Domnic Fernandes | @fdomnic8| |Rhian Lewis | @rhianlewis | |Enrico Mariotti | @boulder225 | |Massimiliano Gerardi | @massi.gerardi |

Any contribution will be appreciated.