2018-06-13 22:39:39 +03:00
|
|
|
'use strict';
|
|
|
|
|
2018-07-12 09:49:09 +03:00
|
|
|
import { Provider } 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,
|
|
|
|
|
|
|
|
FallbackProvider,
|
|
|
|
|
|
|
|
EtherscanProvider,
|
|
|
|
InfuraProvider,
|
|
|
|
JsonRpcProvider,
|
|
|
|
Web3Provider,
|
|
|
|
|
2018-06-18 12:42:41 +03:00
|
|
|
IpcProvider
|
|
|
|
};
|
2018-06-24 11:03:21 +03:00
|
|
|
|
|
|
|
export default {
|
|
|
|
Provider,
|
|
|
|
getDefaultProvider,
|
|
|
|
|
|
|
|
FallbackProvider,
|
|
|
|
|
|
|
|
EtherscanProvider,
|
|
|
|
InfuraProvider,
|
|
|
|
JsonRpcProvider,
|
|
|
|
Web3Provider,
|
|
|
|
|
|
|
|
IpcProvider
|
|
|
|
};
|