API Providers

There are many services which offer a web API for accessing the Ethereum Blockchain. These Providers allow connecting to them, which simplifies development, since you do not need to run your own instance or cluster of Ethereum nodes.

However, this reliance on third-party services can reduce resiliance, security and increase the amount of required trust. To mitigate these issues, it is recommended you use a Default Provider.

EtherscanProvider inherits Provider

The EtherscanProvider is backed by a combination of the various Etherscan APIs.

provider . getHistory ( address ) Array< History >

@TODO... Explain

Supported Networks
  • Homestead (Mainnet)
  • Ropsten (proof-of-work testnet)
  • Rinkeby (proof-of-authority testnet)
  • Görli (clique testnet)
  • Kovan (proof-of-authority testnet)

InfuraProvider inherits UrlJsonRpcProvider

The InfuraProvider is backed by the popular INFURA Ethereum service.

Supported Networks
  • Homestead (Mainnet)
  • Ropsten (proof-of-work testnet)
  • Rinkeby (proof-of-authority testnet)
  • Görli (clique testnet)
  • Kovan (proof-of-authority testnet)

AlchemyProvider inherits UrlJsonRpcProvider

The AlchemtProvider is backed by Alchemy.

Supported Networks
  • Homestead (Mainnet)
  • Ropsten (proof-of-work testnet)
  • Rinkeby (proof-of-authority testnet)
  • Görli (clique testnet)
  • Kovan (proof-of-authority testnet)

CloudfrontProvider inherits UrlJsonRpcProvider

The CloudfrontProvider is backed by the Cloudflare Ethereum Gateway.

Supported Networks
  • Homestead (Mainnet)