This repository was archived by the owner on Dec 26, 2024. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork214
A node.js wrapper for the etherscan api to fetch data and metadata from the ethereum blockchain
License
NotificationsYou must be signed in to change notification settings
sebs/etherscan-api
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A way to access theetherscan.io api using promises. Fetch a diverse set of information about the blockchain.
Mainnet
varapi=require('etherscan-api').init('YourApiKey');varbalance=api.account.balance('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae');balance.then(function(balanceData){console.log(balanceData);});
constaxios=require('axios');const{ init, pickChainUrl}=require('..');constchain=pickChainUrl(null);constclient=axios.create({baseURL:chain,timeout:10000});varapi=init('apikey',null,10000,client);
Supported Chain Explorers
- Etherscan
- ropsten: 'https://api-ropsten.etherscan.io'
- kovan: 'https://api-kovan.etherscan.io'
- rinkeby: 'https://api-rinkeby.etherscan.io'
- goerli: 'https://api-goerli.etherscan.io'
- sepolia: 'https://api-sepolia.etherscan.io'
- homestead: 'https://api.etherscan.io'
- Arbiscan (Experimental)
- arbitrum: 'https://api.arbiscan.io'
- arbitrum_rinkeby: 'https://api-testnet.arbiscan.io'
- Snowtrace (Experimental)
- avalanche:'https://api.snowtrace.io',
- avalanche_fuji: 'https://api-testnet.snowtrace.io'
Latest
// apikey, network, timeoutvarapi=require('etherscan-api').init('YourApiKey','rinkeby'.'3000');
npm install etherscan-api --save
- npm test - runs tests
- npm run posttest - starts the linter
- npm run lint - preconfigured linter
- npm run docs - generates the apidocs
- npm run bundle - builds a new bundle
- npm run preversion - Steps before we create a new Tag
- lint
- changelog
- npm run pages - pushes generated apidocs to the server
- postversion - after generating a new version, push the tag to the server
- npm run changelog - generates a changelog and pushes it
About
A node.js wrapper for the etherscan api to fetch data and metadata from the ethereum blockchain
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published