@akroma-project/akroma-erc20-token-list
v0.0.9
Published
List of all ERC20 tokens.
Downloads
2
Readme
@akroma-project/akroma-erc20-token-list
List of all ERC20 tokens on the Akroma Network (akroma.org). This library is forked from ethereum-lists/src/tokens/eth/
How to use
const { getTokenInfo } = require('@akroma-project/akroma-erc20-token-list');
console.info(getTokenInfo('Dumb'));
import { getTokenInfo } from '@akroma-project/akroma-erc20-token-list';
console.info(getTokenInfo('Dumb'));
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 {
address: string;
decimals: number;
ens_address: string;
logo: Logo;
name: string;
social: Social;
support: Support;
symbol: string;
type: string;
website: string;
}
export interface Logo {
height: string;
ipfs_hash: string;
src: string;
width: string;
}
export interface Social {
blog: string;
chat: string;
facebook: string;
forum: string;
github: string;
gitter: string;
instagram: string;
linkedin: string;
reddit: string;
slack: string;
telegram: string;
twitter: string;
youtube: string;
}
export interface Support {
email: string;
url: string;
}
Quick Start
npx @akroma-project/akroma-erc20-token-list Dumb
Pushing to NPM
npm publish --access public