2018-07-16 10:27:49 +03:00
|
|
|
'use strict';
|
|
|
|
|
2018-09-26 22:47:09 +03:00
|
|
|
import { Contract, ContractFactory, VoidSigner } from './contract';
|
2018-08-02 00:35:23 +03:00
|
|
|
|
2018-09-24 22:55:17 +03:00
|
|
|
import { Signer } from './abstract-signer';
|
|
|
|
import { Wallet } from './wallet';
|
2018-07-31 01:59:52 +03:00
|
|
|
|
2018-09-24 22:55:17 +03:00
|
|
|
import * as constants from './constants';
|
|
|
|
import * as errors from './errors';
|
2018-08-13 18:58:19 +03:00
|
|
|
|
2018-09-24 22:55:17 +03:00
|
|
|
import * as providers from './providers';
|
2018-07-31 01:59:52 +03:00
|
|
|
import * as utils from './utils';
|
2018-09-24 22:55:17 +03:00
|
|
|
import * as wordlists from './wordlists';
|
2018-07-16 10:27:49 +03:00
|
|
|
|
|
|
|
|
2018-09-24 22:55:17 +03:00
|
|
|
////////////////////////
|
|
|
|
// Compile-Time Constants
|
2018-07-16 10:27:49 +03:00
|
|
|
|
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"
|
2018-07-16 10:27:49 +03:00
|
|
|
import { version } from './_version';
|
|
|
|
|
2018-09-24 22:55:17 +03:00
|
|
|
|
|
|
|
////////////////////////
|
|
|
|
// Types
|
|
|
|
|
2018-10-05 02:54:15 +03:00
|
|
|
import { ContractFunction, ContractTransaction, Event, EventFilter } from './contract';
|
2018-09-24 22:55:17 +03:00
|
|
|
|
|
|
|
|
|
|
|
////////////////////////
|
|
|
|
// 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
|
|
|
}
|
|
|
|
|
2018-09-24 22:55:17 +03:00
|
|
|
|
|
|
|
////////////////////////
|
|
|
|
// Exports
|
|
|
|
|
2018-07-16 10:27:49 +03:00
|
|
|
export {
|
2018-09-24 22:55:17 +03:00
|
|
|
Signer,
|
|
|
|
|
2018-07-16 10:27:49 +03:00
|
|
|
Wallet,
|
2018-09-04 17:28:26 +03:00
|
|
|
VoidSigner,
|
2018-07-16 10:27:49 +03:00
|
|
|
|
2018-07-31 01:59:52 +03:00
|
|
|
getDefaultProvider,
|
2018-08-02 00:35:23 +03:00
|
|
|
providers,
|
2018-07-16 10:27:49 +03:00
|
|
|
|
2018-09-24 22:55:17 +03:00
|
|
|
Contract,
|
2018-09-26 22:47:09 +03:00
|
|
|
ContractFactory,
|
2018-09-24 22:55:17 +03:00
|
|
|
|
2018-07-16 10:27:49 +03:00
|
|
|
constants,
|
2018-09-24 22:55:17 +03:00
|
|
|
errors,
|
2018-07-16 10:27:49 +03:00
|
|
|
|
2018-09-24 22:55:17 +03:00
|
|
|
utils,
|
2018-08-02 00:35:23 +03:00
|
|
|
|
2018-07-16 10:27:49 +03:00
|
|
|
wordlists,
|
|
|
|
|
2018-09-24 22:55:17 +03:00
|
|
|
////////////////////////
|
|
|
|
// Compile-Time Constants
|
|
|
|
|
2018-07-17 09:05:24 +03:00
|
|
|
platform,
|
2018-09-24 22:55:17 +03:00
|
|
|
version,
|
|
|
|
|
|
|
|
////////////////////////
|
|
|
|
// Types
|
|
|
|
|
|
|
|
ContractFunction,
|
2018-10-05 02:54:15 +03:00
|
|
|
ContractTransaction,
|
2018-09-24 22:55:17 +03:00
|
|
|
Event,
|
|
|
|
EventFilter
|
2018-07-16 10:27:49 +03:00
|
|
|
};
|
|
|
|
|