ethers.js/src.ts/providers/index.ts

36 lines
818 B
TypeScript
Raw Normal View History

2018-06-13 22:39:39 +03:00
'use strict';
2018-06-18 12:42:41 +03:00
import { Provider, ProviderSigner } from './provider';
2018-06-13 22:39:39 +03:00
import { Network } from './networks';
import { EtherscanProvider } from './etherscan-provider';
import { FallbackProvider } from './fallback-provider';
2018-06-18 12:42:41 +03:00
import { IpcProvider } from './ipc-provider';
2018-06-13 22:39:39 +03:00
import { InfuraProvider } from './infura-provider';
import { JsonRpcProvider } from './json-rpc-provider';
import { Web3Provider } from './web3-provider';
function getDefaultProvider(network?: Network | string): FallbackProvider {
return new FallbackProvider([
new InfuraProvider(network),
new EtherscanProvider(network),
]);
}
export {
Provider,
getDefaultProvider,
2018-06-18 12:42:41 +03:00
ProviderSigner,
2018-06-13 22:39:39 +03:00
FallbackProvider,
EtherscanProvider,
InfuraProvider,
JsonRpcProvider,
Web3Provider,
2018-06-18 12:42:41 +03:00
IpcProvider
};