0.0.3 • Published 3 years ago

erc20-token-list v0.0.3

Weekly downloads
14
License
Apache-2.0
Repository
github
Last release
3 years ago

erc20-token-list

List of all ERC20 tokens. This library is forked from ethereum-lists/src/tokens/eth/

How to use

/* eslint-disable import/no-unresolved,no-console */
const { getTokenInfo } = require('erc20-token-list');

console.info(getTokenInfo('USDT'));

API Manual

There is only one API in this library:

/**
 * Get the token info.
 *
 * @param symbol The token symbol, e.g., USDT, BNB, LINK, etc.
 * @returns The TokenInfo, undefined if not exists
 */
export declare function getTokenInfo(symbol: string): TokenInfo;

Which returns an TokenInfo:

export interface TokenInfo {
  symbol: string;
  name: string;
  type: string;
  address: string;
  decimals: number;
}

Quick Start

npx erc20-token-list USDT
0.0.3

3 years ago

0.0.2

4 years ago

0.0.1

4 years ago