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

iotex-token-metadata

v1.3.28

Published

a collection of the metadata of all tokens on IoTeX blockchain.

Downloads

80

Readme

IoTeX Token Metadata

This repo is a collection of the metadata of tokens (XRC20, XRC721, etc...) deployed to IoTeX blockchain. Developers can use this repo to list these tokens in their projects.

Metadata of a token consists of the following JSON object:

{
  "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw": {
    "name": "Vitality",
    "description": "Vitality (VITA) is a decentralized token for the IoTeX community.",
    "logo": "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw.png",
    "type": "xrc20",
    "symbol": "VITA",
    "decimals": 18
  }

where: | Field | Required | Values | default | Notes | |-------------|:--------:|------------------|:-------:|----------------------------------------------------------| | name | ✓ | string | | Token Name | | description | ✓ | string | | Token Description | | logo | ✓ | file name | | logo image file name with extension | | type | ✓ | xrc20 xrc721 | | Type of token | | symbol | ✓ | string | | The symbol of the token | | decimals | | integer | 18 | The number of decimals

IoTeX Explorer (https://iotexscan.io/) and ioPay wallets (http://iopay.iotex.io/) will include this metadata in their apps. Any IoTeX ecosystem app can include this package in their code (see the Usage section below).

New token submission process

Please notice that maintaining this list is not our highest priority. We do not guarantee the inclusion of your project metadata on any urgent timeline, because maintaining this list is a demanding and security-delicate task. We may also decide not to include the submission at all, e.g. if there are no proofs for a legit project behind the token, if we suspect the risk of pump&dump activity, airdrop-based phishing, or any cryptocurrency counterfeit scam. Plese see the Guidelines for tokens section below.

You can follow the steps below to submit your token metadata for review:

  1. verify your token smart contract here: https://iotexscout.io/verifyContract.
  2. fork this repo
  3. add your token logo to the images/ folder
  4. add your metadata to token-metadata.json
  5. commit to your forked repo
  6. create a PR to this repo with links to token project website
  7. wait for your PR to get reviewed
  8. once approved, you can merge your PR

Guidelines for tokens

We will only take into consideration projects that show clear signs of activity: either traffic on the network, activity on GitHub, or community buzz.

  • The icon should be small, square, but high resolution, ideally a vector/svg. For png/jpg, 64x64 is recommended.
  • Do not add your entry to the end of the JSON map, messing with the trailing comma.
  • Your pull request should only be an addition of lines: data removals should be made as a deliberate deprecation of the affected logo.
  • Make sure your PR includes a link to official project website referencing the token contract address you are submitting. Also, the website should include a detailed explanation of project.
  • No Profanity in token name, description, etc.

Usage

Install this package from npm with npm install iotex-token-metadata -s and use it in your code like in the example below:

metadatasMap = require("iotex-token-metadata");

let address = "io1hp6y4eqr90j7tmul4w2wa8pm7wx462hq0mg4tw";
console.log("Metadata for token address: ", address);

let metadata = getXrc20TokenMetadata(address);

console.log("Token Name:", metadata.name);
console.log("Token Description:", metadata.description);
console.log("Token logo:", metadata.logo);
console.log("Token type:", metadata.type);
console.log("Token symbol:", metadata.symbol)
if (metadata.type=="xrc20") {
  console.log("Token Decimals:", metadata.decimals);
}

function getXrc20TokenMetadata(address) {
  const metadata = metadatasMap[address];
  return metadata;
}

Publish lib

Intended for the repository maintainer only (not required for token submission):

$ npm login
// update package.json version
$ npm publish .

How to unit test

npm ci
npm test

Please make sure the unit test is passed before submitting a PR.