2016-12-11 10:30:30 +01:00
|
|
|
# @parity/etherscan
|
2016-12-11 10:13:34 +01:00
|
|
|
|
|
|
|
A thin, lightweight promise wrapper for the api.etherscan.io/apis service, exposing a common endpoint for use in JavaScript applications.
|
|
|
|
|
2017-07-21 15:46:53 +02:00
|
|
|
[https://github.com/paritytech/parity/tree/master/js/packages/3rdpartyetherscan](https://github.com/paritytech/parity/tree/master/js/packages/etherscan)
|
2016-12-11 10:13:34 +01:00
|
|
|
|
|
|
|
## usage
|
|
|
|
|
|
|
|
installation -
|
|
|
|
|
|
|
|
```
|
2016-12-11 10:30:30 +01:00
|
|
|
npm install --save @parity/etherscan
|
2016-12-11 10:13:34 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
Usage -
|
|
|
|
|
|
|
|
```
|
2016-12-11 10:30:30 +01:00
|
|
|
const etherscan = require('@parity/etherscan');
|
2016-12-11 10:13:34 +01:00
|
|
|
|
|
|
|
// api calls goes here
|
|
|
|
```
|
|
|
|
|
|
|
|
## api
|
|
|
|
|
|
|
|
account (exposed on etherscan.account) -
|
|
|
|
|
|
|
|
- `balance(address)`
|
|
|
|
- `balances(addresses)` (array or addresses)
|
|
|
|
- `transactions(address, page)` (page offset starts at 0, returns 25)
|
|
|
|
|
|
|
|
stats (exposed on etherscan.stats) -
|
|
|
|
|
|
|
|
- `price()`
|
|
|
|
- `supply()`
|