Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ethersan

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethersan

Node.js library for communicating with the Etherscan API.

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

etherscan

Node.js library for communicating with the Etherscan API.

Installation

$ npm i request
$ npm i etherscan

request is defined as a peer-dependency and thus has to be installed separately.

Testing

$ npm test

Import

Using CommonJS

Requirements (Node.js >= 8.0.0).

const Etherscan = require('etherscan');

Using ESM

Use --experimental-modules flag and .mjs extension (Node.js >= 8.6.0).

import Etherscan from 'etherscan';

Usage

import Etherscan from 'etherscan';

const etherscan = new Etherscan(API_KEY); // Some methods working without API_KEY

(async () => {
    const data = await etherscan.getEtherBalance({
        address: '0x00'
    });
})();

API

Accounts

getEtherBalance

Get Ether balance for a single address.

etherscan.getEtherBalance({
    address: '0x00',
    tag: 'latest' // Optional, default 'latest'
});
getEtherBalanceMulti

Get Ether balance for multiple addresses in a single call.

etherscan.getEtherBalanceMulti({
    address: ['0x00', '0x01'],
    tag: 'latest' // Optional, default 'latest'
});
getTxList

Get a list of normal transactions by address.

etherscan.getTxList({
    address: '0x00',
    startblock: 0, // Optional
    endblock: 0, // Optional
    sort: 'desc' // Optional, default 'asc'
});
getTxListInternal

Get a list of internal transactions by address.

etherscan.getTxListInternal({
    address: '0x00',
    startblock: 0, // Optional
    endblock: 0, // Optional
    sort: 'desc' // Optional, default 'asc'
});

Keywords

FAQs

Package last updated on 01 Nov 2024

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