diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-03 19:27:08 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-03 19:27:08 +0800 |
commit | 406b7c33f553ab40aee5e1fe068b9f3d190a4fdd (patch) | |
tree | ef59633634f2a438a8326c82fb0afbb527cdc4f6 /packages/subproviders/src | |
parent | 13520dbd94831cd93e419d000e933bfb75c99e84 (diff) | |
download | dexon-sol-tools-406b7c33f553ab40aee5e1fe068b9f3d190a4fdd.tar.gz dexon-sol-tools-406b7c33f553ab40aee5e1fe068b9f3d190a4fdd.tar.zst dexon-sol-tools-406b7c33f553ab40aee5e1fe068b9f3d190a4fdd.zip |
Re-order subproviders index.ts and add missing types
Diffstat (limited to 'packages/subproviders/src')
-rw-r--r-- | packages/subproviders/src/index.ts | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts index 905590539..eb9347bdb 100644 --- a/packages/subproviders/src/index.ts +++ b/packages/subproviders/src/index.ts @@ -1,11 +1,21 @@ import Eth from '@ledgerhq/hw-app-eth'; import TransportU2F from '@ledgerhq/hw-transport-u2f'; +import { LedgerEthereumClient } from './types'; + export import Web3ProviderEngine = require('web3-provider-engine'); -export { ECSignature } from '@0xproject/types'; -import { LedgerEthereumClient } from './types'; +/** + * A factory method for creating a LedgerEthereumClient usable in a browser context. + * @return LedgerEthereumClient A browser client for the LedgerSubprovider + */ +export async function ledgerEthereumBrowserClientFactoryAsync(): Promise<LedgerEthereumClient> { + const ledgerConnection = await TransportU2F.create(); + const ledgerEthClient = new Eth(ledgerConnection); + return ledgerEthClient; +} export { prependSubprovider } from './utils/subprovider_utils'; + export { EmptyWalletSubprovider } from './subproviders/empty_wallet_subprovider'; export { FakeGasEstimateSubprovider } from './subproviders/fake_gas_estimate_subprovider'; export { SignerSubprovider } from './subproviders/signer'; @@ -18,6 +28,7 @@ export { NonceTrackerSubprovider } from './subproviders/nonce_tracker'; export { PrivateKeyWalletSubprovider } from './subproviders/private_key_wallet'; export { MnemonicWalletSubprovider } from './subproviders/mnemonic_wallet'; export { EthLightwalletSubprovider } from './subproviders/eth_lightwallet_subprovider'; + export { Callback, ErrorCallback, @@ -28,16 +39,13 @@ export { LedgerSubproviderConfigs, PartialTxParams, DerivedHDKeyInfo, + JSONRPCRequestPayloadWithMethod, + ECSignatureString, + AccountFetchingConfigs, + LedgerEthereumClientFactoryAsync, + OnNextCompleted, } from './types'; -/** - * A factory method for creating a LedgerEthereumClient usable in a browser context. - * @return LedgerEthereumClient A browser client for the LedgerSubprovider - */ -export async function ledgerEthereumBrowserClientFactoryAsync(): Promise<LedgerEthereumClient> { - const ledgerConnection = await TransportU2F.create(); - const ledgerEthClient = new Eth(ledgerConnection); - return ledgerEthClient; -} +export { ECSignature } from '@0xproject/types'; -export { JSONRPCRequestPayload, Provider } from 'ethereum-types'; +export { JSONRPCRequestPayload, Provider, JSONRPCResponsePayload, JSONRPCErrorCallback } from 'ethereum-types'; |