client for the Etherscan API
npm install etherscan-client-typescript [npm]: https://www.npmjs.com/package/etherscan-client-typescript
[npm-svg]: https://img.shields.io/npm/v/etherscan-client-typescript.svg?style=flat
TypeScript client for the Etherscan API
npm i --save etherscan-client-typescript``typescript
import EtherscanClient from 'etherscan-client-typescript';
async function printAbi() {
const client = new EtherscanClient({ apiKey: 'my-key', apiUrl: 'https://api.etherscan.io/api' });
const abi = await client.getAbi(SOME_CONTRACT_ADDRESS);
console.log(abi);
}
``