aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/subproviders/src/index.ts')
-rw-r--r--packages/subproviders/src/index.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts
index 9560c3597..9b7cab3fa 100644
--- a/packages/subproviders/src/index.ts
+++ b/packages/subproviders/src/index.ts
@@ -17,12 +17,20 @@ export {
LedgerCommunicationClient,
} from './types';
+/**
+ * A factory method for creating a LedgerEthereumClient usable in a browser context.
+ * @return LedgerEthereumClient A browser client
+ */
export async function ledgerEthereumBrowserClientFactoryAsync(): Promise<LedgerEthereumClient> {
const ledgerConnection = await LedgerBrowserCommunication.create_async();
const ledgerEthClient = new LedgerEthereumClientFn(ledgerConnection);
return ledgerEthClient;
}
+/**
+ * A factory for creating a LedgerEthereumClient usable in a Node.js context.
+ * @return LedgerEthereumClient A Node.js client
+ */
export async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumClient> {
const ledgerConnection = await LedgerNodeCommunication.create_async();
const ledgerEthClient = new LedgerEthereumClientFn(ledgerConnection);