Create a new **EtherscanProvider** connected to *network* with the optional *apiKey*.
The *network* may be specified as **string** for a common network name, a **number** for a common chain ID or a [Network Object]provider-(network).
If no *apiKey* is provided, a shared API key will be used, which may result in reduced performance and throttled requests. It is highly recommended for production, you register with [Etherscan](https://etherscan.io) for your own API key.
#### Note: Default API keys
If no *apiKey* is provided, a shared API key will be used, which may result in reduced performance and throttled requests.
It is highly recommended for production, you register with [Etherscan](https://etherscan.io) for your own API key.
#### **Supported Networks**
- Homestead (Mainnet)
- Ropsten (proof-of-work testnet)
- Rinkeby (proof-of-authority testnet)
- Gorli (clique testnet)
- Kovan (proof-of-authority testnet)
```javascript
// Connect to mainnet (homestead)
provider = new EtherscanProvider();
// Connect to rinkeby testnet (these are equivalent)
Create a new **InfuraProvider** connected to *network* with the optional *apiKey*.
The *network* may be specified as **string** for a common network name, a **number** for a common chain ID or a [Network Object]provider-(network).
The *apiKey* can be a **string** Project ID or an **object** with the properties `projectId` and `projectSecret` to specify a [Project Secret](https://infura.io/docs/gettingStarted/authentication) which can be used on non-public sources (like on a server) to further secure your API access and quotas.
Create a new [WebSocketProvider](/v5/api/providers/other/#WebSocketProvider) using the INFURA web-socket endpoint to connect to *network* with the optional *apiKey*.
The *network* and *apiKey* are specified the same as [the constructor](/v5/api/providers/api-providers/#InfuraProvider).
Create a new **AlchemyProvider** connected to *network* with the optional *apiKey*.
The *network* may be specified as **string** for a common network name, a **number** for a common chain ID or a [Network Object](/v5/api/providers/types/#providers-Network).
#### Note: Default API keys
If no *apiKey* is provided, a shared API key will be used, which may result in reduced performance and throttled requests.
It is highly recommended for production, you register with [Alchemy](https://alchemyapi.io) for your own API key.
#### **Supported Networks**
- Homestead (Mainnet)
- Ropsten (proof-of-work testnet)
- Rinkeby (proof-of-authority testnet)
- Gorli (clique testnet)
- Kovan (proof-of-authority testnet)
```javascript
// Connect to mainnet (homestead)
provider = new AlchemyProvider();
// Connect to the ropsten testnet
// (see EtherscanProvider above for other network examples)
provider = new AlchemyProvider("ropsten");
// Connect to mainnet with an API key (these are equivalent)
provider = new AlchemyProvider(null, apiKey);
provider = new AlchemyProvider("homestead", apiKey);