ethers.js/src.ts/ethers.ts

54 lines
1021 B
TypeScript
Raw Normal View History

'use strict';
import { Contract, Interface } from './contracts';
2018-08-02 00:35:23 +03:00
2018-08-03 03:30:44 +03:00
import * as providers from './providers';
2018-08-02 00:35:23 +03:00
import { HDNode, SigningKey, Wallet } from './wallet';
import * as constants from './utils/constants';
2018-08-03 03:30:44 +03:00
import * as errors from './utils/errors';
import * as utils from './utils';
2018-08-03 03:30:44 +03:00
import * as types from './types';
2018-08-03 03:30:44 +03:00
import * as wordlists from './wordlists';
2018-08-02 00:35:23 +03:00
// This is empty in node, and used by browserify to inject extra goodies
import { platform } from './utils/shims';
// This is generated by "npm run dist"
import { version } from './_version';
2018-08-03 03:30:44 +03:00
function getDefaultProvider(network?: types.Network | string): providers.BaseProvider {
return new providers.FallbackProvider([
new providers.InfuraProvider(network),
new providers.EtherscanProvider(network),
]);
2018-08-02 00:35:23 +03:00
}
export {
Wallet,
HDNode,
SigningKey,
Contract,
Interface,
getDefaultProvider,
2018-08-02 00:35:23 +03:00
providers,
errors,
constants,
utils,
2018-08-02 00:35:23 +03:00
types,
wordlists,
2018-07-17 09:05:24 +03:00
platform,
version
};