ethers.js/src.ts/ethers.ts

60 lines
1.1 KiB
TypeScript

'use strict';
import { Contract, Interface, VoidSigner } from './contracts';
import * as providers from './providers';
import { HDNode, SigningKey, Wallet } from './wallet';
import { AbiCoder } from './utils/abi-coder';
import { BigNumber } from './utils/bignumber';
import * as constants from './utils/constants';
import * as errors from './utils/errors';
import * as utils from './utils';
import * as types from './types';
import * as wordlists from './wordlists';
// 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';
function getDefaultProvider(network?: types.Network | string): providers.BaseProvider {
return new providers.FallbackProvider([
new providers.InfuraProvider(network),
new providers.EtherscanProvider(network),
]);
}
export {
Wallet,
VoidSigner,
HDNode,
SigningKey,
Contract,
Interface,
getDefaultProvider,
providers,
AbiCoder,
BigNumber,
errors,
constants,
utils,
types,
wordlists,
platform,
version
};