Socket
Socket
Sign inDemoInstall

@myetherwallet/eth-token-balance

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@myetherwallet/eth-token-balance

Get token balances of an eth address


Version published
Maintainers
4
Created
Source

eth-token-balance

npm library to read all token balances of an ethereum address

Install

npm install @myetherwallet/eth-token-balance

Example to read all token balances

import TokenBalance from "@myetherwallet/eth-token-balance";
const tb = new TokenBalance(web3.currentProvider);
tb.getBalance("0xDECAF9CD2367cdbb726E904cD6397eDFcAe6068D").then(balances => {
  console.log(balances);
});

Output

[ { symbol: '$TEAK',
    addr: '0x7dd7f56d697cc0f2b52bd55c057f378f1fe6ab4b',
    decimals: 18,
    balance: '0',
    name: '$TEAK',
    website: 'https://steak.network',
    email: 'support@steak.network' },
  { symbol: 'DIVX',
    addr: '0x13f11c9905a08ca76e3e853be63d4f0944326c72',
    decimals: 18,
    balance: '0',
    name: 'DIVX',
    website: 'https://www.diviproject.org',
    email: 'support@diviproject.org' }, ...

Token Storage Contracts

mainnet: 0x202549FCF4Cc855ACA456c39A839c4f202Ee5Cef
ropsten: 0xf166098CBA584b3Ebf9B5014Dca4009E89F4485d

Keywords

FAQs

Package last updated on 01 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc