JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q41427F
  • License MIT

Node.js library for Etherscan.io

Package Exports

  • etherscan.js
  • etherscan.js/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (etherscan.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Etherscan.js

Etherscan.js is a JavaScript library for interacting with the Etherscan API.

Requirements

This library uses Axios for making HTTP requests. This means it is able to run in the browser and in Node.js.
When running in the browser, be aware, that API keys are exposed to the client.

Example

// Loads the library
import { API as Etherscan } from 'etherscan.js';

// Creates an instance of the API class with your key and network
const es = new Etherscan({
    key: {
        key: "YOUR_KEY_HERE",
        plan: "free"
        limit: 5
    },
    network: "mainnet"
});

// Retrieves account balance for an address using promises
console.log(await es.fetcher.getAccountBalance("0x2A20380DcA5bC24D052acfbf79ba23e988ad0050"))