ethers.js/src.ts/ethers.ts

79 lines
1.4 KiB
TypeScript
Raw Normal View History

'use strict';
import { Contract, ContractFactory, VoidSigner } from './contract';
2018-08-02 00:35:23 +03:00
import { Signer } from './abstract-signer';
import { Wallet } from './wallet';
import * as constants from './constants';
import * as errors from './errors';
import * as providers from './providers';
import * as utils from './utils';
import * as wordlists from './wordlists';
////////////////////////
// Compile-Time Constants
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';
////////////////////////
// Types
import { ContractFunction, Event, EventFilter } from './contract';
////////////////////////
// Helper Functions
function getDefaultProvider(network?: utils.Network | string): providers.BaseProvider {
2018-08-03 03:30:44 +03:00
return new providers.FallbackProvider([
new providers.InfuraProvider(network),
new providers.EtherscanProvider(network),
]);
2018-08-02 00:35:23 +03:00
}
////////////////////////
// Exports
export {
Signer,
Wallet,
VoidSigner,
getDefaultProvider,
2018-08-02 00:35:23 +03:00
providers,
Contract,
ContractFactory,
constants,
errors,
utils,
2018-08-02 00:35:23 +03:00
wordlists,
////////////////////////
// Compile-Time Constants
2018-07-17 09:05:24 +03:00
platform,
version,
////////////////////////
// Types
ContractFunction,
Event,
EventFilter
};