blob: d88792fd02c3e34e96b20d6e30a022dc90282266 (
plain) (
tree)
|
|
import Eth from '@ledgerhq/hw-app-eth';
import TransportU2F from '@ledgerhq/hw-transport-u2f';
import { LedgerEthereumClient } from './types';
export { EmptyWalletSubprovider } from './subproviders/empty_wallet_subprovider';
export { FakeGasEstimateSubprovider } from './subproviders/fake_gas_estimate_subprovider';
export { InjectedWeb3Subprovider } from './subproviders/injected_web3';
export { RedundantRPCSubprovider } from './subproviders/redundant_rpc';
export { LedgerSubprovider } from './subproviders/ledger';
export { GanacheSubprovider } from './subproviders/ganache';
export { Subprovider } from './subproviders/subprovider';
export { NonceTrackerSubprovider } from './subproviders/nonce_tracker';
export {
Callback,
ErrorCallback,
NextCallback,
ECSignature,
LedgerWalletSubprovider,
LedgerCommunicationClient,
NonceSubproviderErrors,
LedgerSubproviderConfigs,
} 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;
}
|