Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danakt/node-etherscan-api
Etherscan API for Node.js
https://github.com/danakt/node-etherscan-api
api blockchain ether ethereum etherscan etherscan-api nodejs
Last synced: 8 days ago
JSON representation
Etherscan API for Node.js
- Host: GitHub
- URL: https://github.com/danakt/node-etherscan-api
- Owner: danakt
- License: mit
- Created: 2018-03-04T17:20:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T01:20:38.000Z (almost 2 years ago)
- Last Synced: 2024-11-02T08:22:22.699Z (15 days ago)
- Topics: api, blockchain, ether, ethereum, etherscan, etherscan-api, nodejs
- Language: JavaScript
- Homepage:
- Size: 1.01 MB
- Stars: 12
- Watchers: 2
- Forks: 8
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Node.js Etherscan API
[![npm](https://img.shields.io/npm/v/node-etherscan-api.svg?style=flat-square)](https://www.npmjs.com/package/node-etherscan-api)
[![Travis branch](https://img.shields.io/travis/danakt/node-etherscan-api/master.svg?style=flat-square)](https://travis-ci.org/danakt/node-etherscan-api)Node.js package to interact with official [Etherscan API](https://etherscan.io/apis)
## Documentation
**[API reference](https://github.com/danakt/node-etherscan-api/blob/master/docs/API.md)**
The API reference was generated by JSDoc.
If you use Typescript, you can use the more detailed reference found in the [type declaration file](https://github.com/danakt/node-etherscan-api/blob/master/index.d.ts)## Install
```bash
$ npm install node-etherscan-api
```## Usage
```js
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