aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/src/index.ts
blob: 8f02210c99a3cdaa995e9ff19b3ae768913962c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import Eth from '@ledgerhq/hw-app-eth';
import TransportU2F from '@ledgerhq/hw-transport-u2f';
export import Web3ProviderEngine = require('web3-provider-engine');

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';
export { RedundantSubprovider } from './subproviders/redundant_subprovider';
export { LedgerSubprovider } from './subproviders/ledger';
export { RPCSubprovider } from './subproviders/rpc_subprovider';
export { GanacheSubprovider } from './subproviders/ganache';
export { Subprovider } from './subproviders/subprovider';
export { NonceTrackerSubprovider } from './subproviders/nonce_tracker';
export { PrivateKeyWalletSubprovider } from './subproviders/private_key_wallet';
export { MnemonicWalletSubprovider } from './subproviders/mnemonic_wallet';
export { MetamaskSubprovider } from './subproviders/metamask_subprovider';
export { EthLightwalletSubprovider } from './subproviders/eth_lightwallet_subprovider';

export {
    Callback,
    ErrorCallback,
    NextCallback,
    LedgerCommunicationClient,
    LedgerEthereumClient,
    NonceSubproviderErrors,
    LedgerSubproviderConfigs,
    PartialTxParams,
    JSONRPCRequestPayloadWithMethod,
    ECSignatureString,
    AccountFetchingConfigs,
    LedgerEthereumClientFactoryAsync,
    OnNextCompleted,
    MnemonicWalletSubproviderConfigs,
    LedgerGetAddressResult,
} from './types';

export {
    ECSignature,
    EIP712Object,
    EIP712ObjectValue,
    EIP712TypedData,
    EIP712Types,
    EIP712Parameter,
} from '@0x/types';

export {
    JSONRPCRequestPayload,
    Provider,
    JSONRPCResponsePayload,
    JSONRPCErrorCallback,
    JSONRPCResponseError,
} from 'ethereum-types';