Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

node-etherscan-api

0.1.2 • Public • Published

Node.js Etherscan API

npm Travis branch

Node.js package to interact with official Etherscan API

Documentation

API reference

The API reference was generated by JSDoc. If you use Typescript, you can use the more detailed reference found in the type declaration file

Install

$ npm install node-etherscan-api

Usage

const Etherscan = require('node-etherscan-api')
 
// Replace the value below with the your Etherscan token
const TOKEN_API = 'YourApiKeyToken'
 
// Creating the Etherscan instance
const etherscan = new Etherscan(TOKEN_API)
 
// Creating a request for account balance in Ether (default returns in Wei)
etherscan
  .getAccountBalance('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae', 'eth')
  .then(balance => {
    // Working with the balance here
    console.log(balance)
  })
  .catch(err => {
    // Handle error here
    console.error(err)
  })

License

The MIT License (MIT)

Copyright © 2018 Danakt Frost

install

npm i node-etherscan-api

Downloadsweekly downloads

62

version

0.1.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability